nfs shares have trailing slash in /proc/mounts
I just upgraded from Squeeze to Wheezy and noticed that now NFS exports
have an extra trailing slash in /proc/mounts (aka /etc/mtab, aka
/proc/self/mounts).
> server:/vol/export1/ on /server/mountpath type nfs (rw,nosuid,nodev,noatime…)
But the trailing slash is not originated in /etc/fstab.
> server:/vol/export1 /server/mountpath nfs rw,...
The problem is that if you try to umount using the same string as in
/etc/fstab, it will not umount.
> umount: server:/vol/export1: not found
If you add the trailing slash, the umount works.
Similarly, if you try to edit fstab based on exports in /proc/mounts
you may have trouble unless you carefully handle trailing slashes.
I noticed this problem because an automated script started failing.
/var/run/mount/utab does not contain the extra trailing slash.
Googling hasn't returned anything directly relevant for NFS, though this
looks close: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653630
There was a similar problem on CIFS that was labeled a bug and fixed.
Does anyone know if this change was on purpose? I could imagine that somebody
wants to add trailing slashes to directories to make them more readable.
Thanks,
Chris
linux kernel: 3.2.0-2-amd64
nfs-common: 1:1.2.5-4
Reply to: