Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to specify NFS version, or is there any workaround? #176

Closed
ghost opened this issue Mar 18, 2021 · 2 comments
Closed

allow to specify NFS version, or is there any workaround? #176

ghost opened this issue Mar 18, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 18, 2021

The csi-driver-nfs always try a NFSv4 connection.

When trying to connect to a NFSv3 only server it fails.

If I do tests from a linux machine to connect to this NFS server

root@ubuntu1804:/home/irispulse# mount -v -t nfs 192.168.123.1:/ /mnt mount.nfs: timeout set for Thu Mar 18 07:18:43 2021 mount.nfs: trying text-based options 'vers=4.2,addr=192.168.123.1,clientaddr=192.168.123.129' mount.nfs: mount(2): Operation not supported mount.nfs: requested NFS version or transport protocol is not supported

but if passing options

root@ubuntu1804:/home/irispulse# mount -v -t nfs -o nfsvers=3 192.168.123.1:/ /mnt mount.nfs: timeout set for Thu Mar 18 07:19:49 2021 mount.nfs: trying text-based options 'nfsvers=3,addr=192.168.123.1' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: trying 192.168.123.1 prog 100003 vers 3 prot TCP port 2049 mount.nfs: prog 100005, trying vers=3, prot=17 mount.nfs: trying 192.168.123.1 prog 100005 vers 3 prot UDP port 1058
and works!

---- Use case

I have several testing/dev environments. And the aim is having lightweight dev environments on windows system.
Here I can use winnfsd https://github.com/winnfsd/winnfsd, on the main windows host, and have k8s running in a VM.
Then I can run WinNFSd.exe -pathFile C:\path\to\your\pathfile and simulate the exports of a linux NFS server
However WinNFSd only supports NFSv3, and I cannot find any open source NFSv4 client for this windows lightweight kind of systems.

@andyzhangx
Copy link
Member

try mountOptions:

mountOptions:
- hard
- nfsvers=4.1

@ghost
Copy link
Author

ghost commented Mar 19, 2021

Thanks, its work !

@ghost ghost closed this as completed Mar 19, 2021
TerryHowe pushed a commit to TerryHowe/csi-driver-nfs that referenced this issue Oct 17, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant