Public bug reported:

After upgrading from Feisty to Gutsy (i386) I discovered that NFS
filesystems mounted from a version 2 only server can't no longer be
unmounted cleanly, unless the "vers=2" option is specified explicitly in
the mount options:

  # mount -o vers=3 172.16.1.1:/tmp /mnt
  mount.nfs: mount to NFS server '172.16.1.1' failed: RPC Error: 
Program/version mismatch

this is expected and shows that the server supports only vers=2.

If I try the mount with vers=2 and it works perfectly and I can mount
the fs, access the files and unmount it:

  # mount -o vers=2 172.16.1.1:/tmp /mnt
  # cat /proc/mounts | grep 172.16.1.1
  172.16.1.1:/tmp /mnt nfs 
rw,vers=2,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=172.16.1.1
 0 0
  # ls -l /mnt
  total 1568
  -rw------- 1 dz dz  92172 2007-11-20 10:03 /mnt/fileHelgze
  ...
  # umount /mnt
  #

If I do the mount with default options, without vers=2, the mount works
(using vers=2) and I can access the fs but then I can't unmount it:

  # mount 172.16.1.1:/tmp /mnt
  # cat /proc/mounts | grep 172.16.1.1
  172.16.1.1:/tmp /mnt nfs 
rw,vers=2,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=172.16.1.1
 0 0
  # ls -l /mnt
  total 1568
  -rw------- 1 dz dz  92172 2007-11-20 10:03 /mnt/fileHelgze
  ...
  # umount /mnt
  umount.nfs: Server failed to unmount '172.16.1.1:/tmp'
  umount.nfs: Server failed to unmount '172.16.1.1:/tmp'
  # cat /proc/mounts | grep 172.16.1.1
  172.16.1.1:/tmp /mnt nfs 
rw,vers=2,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=172.16.1.1
 0 0

The line in /proc/mounts shows that the fs has been mounted with vers=2,
as in the previous case, but the umount command fails and the fs is not
unmounted, The only way to remove it is to use "umount -f -l /mnt".

I tried also the following experiment with the mount command from Feisty
and it shows that it works and the problem is in the mount.nfs command
of Gutsy:

  # mv /sbin/mount.nfs /sbin/mount.nfs.disabled
  # /tmp/mount.2.12r-17ubuntu2.1 172.16.1.1:/tmp /mnt
  # ls -l /mnt
  total 1568
  -rw------- 1 dz dz  92172 2007-11-20 10:03 /mnt/fileHelgze
  ...
  # umount /mnt/
  #

I'm not an NFS expert but it seems that the new mount.nfs command of
Gutsy (which was not present in Feisty) doesn't handle correctly the
protocol negotiation with the server and fills some incorrect value in
the fs structure when the vers=2 is not specified explicitly.

** Affects: nfs-utils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
[gutsy] can't unmount filesystem mounted from a nfs version 2 server
https://bugs.launchpad.net/bugs/164595
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to