Your verification showed "permission denied" when NFSv3 was attempted,
which I expect when -t nfs4 is used, but not in the -t nfs case, or when
"-t" is not used at all.

Since this is a quick check, I ran these tests:

root@j-nfs-server:~# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.0 -4.1 -4.2

Autonegotiation falls back to 3.0:
root@f-nfs-client:~# mount -t nfs j-nfs-server.vms:/storage /mnt 
root@f-nfs-client:~# mount|grep nfs
j-nfs-server.vms:/storage on /mnt type nfs 
(rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.122.149,mountvers=3,mountport=42872,mountproto=udp,local_lock=none,addr=192.168.122.149)


And when the server supports them all, and I request v3 specifically, that also 
works:

root@j-nfs-server:~# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2

root@f-nfs-client:~# mount -t nfs j-nfs-server.vms:/storage /mnt  -o vers=3
root@f-nfs-client:~# mount | grep nfs
j-nfs-server.vms:/storage on /mnt type nfs 
(rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.122.149,mountvers=3,mountport=40448,mountproto=udp,local_lock=none,addr=192.168.122.149)


And autonegotiation also still works and selects 4.2 when I just use "-t nfs" 
(not -t nfs4):
root@f-nfs-client:~# mount -t nfs j-nfs-server.vms:/storage /mnt
root@f-nfs-client:~# mount|grep nfs
j-nfs-server.vms:/storage on /mnt type nfs4 
(rw,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.242,local_lock=none,addr=192.168.122.149)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2059197

Title:
  mount.nfs: Fix minor version parsing when '-t nfs4' and '-o vers=4.x'
  are used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2059197/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to