[Bug 974374] Re: Error on unmounting a NFSv4 share
bluearcus
mike.miller at gmx.co.uk
Mon Dec 3 21:23:21 UTC 2012
This problem is not limited to stale mounts.
It's an error in the interaction between mount, umount and mount details
in /proc/mounts vs /etc/mtab
In /etc/mtab, nfs4 mounts seem to have a problem with leading slashes.
For example, on my 12.04 client machine, mounting a zfs volume on a
12.04 host, the following works fine:
me at client:/$ sudo mount -t nfs bighost:/remotevol /mnt/target
me at client:/$ sudo umount /mnt/target
me at client:/$
No issues.
However, the mount command will accept the volume spec without the
leading slash and mount it:
me at client:/$ sudo mount -t nfs bighost:remotevol /mnt/target
me at client:/$ sudo umount /mnt/target
/mnt/target was not found in /proc/mounts
/mnt/target was not found in /proc/mounts
me at client:/$
And the the remotevol is not unmounted.
umount fails to identify the mounted volume in /proc/mounts because,
when mounted without the leading slash, it is denoted differently
between /proc/mounts and the entry in /etc/mtab
me at client:/$ grep /mnt/target /etc/mtab
bighost:remotevol /mnt/target nfs rw,vers=4,addr=192.168.1.19,clientaddr=192.168.1.128 0 0
me at client:/$ grep /mnt/target /proc/mounts
bighost:/remotevol/ /mnt/target nfs4 rw,relatime,vers=4,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.128,minorversion=0,local_lock=none,addr=192.168.1.19 0 0
To fix at time of the error, edit mtab for the un-umountable volume and
add a leading slash to the volume path specifier... then unmount and it
will work.
To prevent the error occurring, always specify volume paths with a
leading slash on the command line or in fstab...
Real fix... I guess mount should require a leading slash on the volume
name, and it's a bug that it doesn't?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/974374
Title:
Error on unmounting a NFSv4 share
Status in “util-linux” package in Ubuntu:
Confirmed
Bug description:
When unmounting an NFSv4 share I get the following error message:
[mntent]: line <nr.> in /proc/mounts is bad
The umount seems to succeed though.
Package Info:
nfs-common 1:1.2.5-3ubuntu2
Linux 3.2.0-22-generic
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/974374/+subscriptions
More information about the foundations-bugs
mailing list