Guillaume Rousse
2010-01-17 13:22:07 UTC
Hello list.
A mandriva user report than unmount filesystem at shutdown is broken
since the move of {mount,unmount}.nfs commands from coreutils to
nfs-utils, some times ago:
https://qa.mandriva.com/show_bug.cgi?id=36490
It seems to be caused by the use of -l option in initscripts, which
apparently don't send an umount request to the server anymore. A simple
test is enough to confirm it:
When using 'mount.nfs server:/dir dir && umount.nfs dir' on the client,
the server logs:
Jan 17 14:01:12 mountd[18714]: authenticated mount request from
192.168.0.1:840 for /home (/home)
Jan 17 14:01:12 mountd[18714]: authenticated unmount request from
192.168.0.1:1012 for /home (/home)
When using 'mount.nfs server:/dir dir && umount.nfs dir -l' on the
client, the server logs:
Jan 17 14:09:17 mountd[18714]: authenticated mount request from
192.168.0.1:955 for /home (/home)
The filesystem is umounted client-side, but the server still thinks he
is connected:
[root at oberkampf Desktop]# showmount
Hosts on oberkampf:
192.168.0.1
client uses nfs-utils 1.2.0.
Reading the code in nfsumount.c, as suggested by comment #11
(https://qa.mandriva.com/show_bug.cgi?id=36490#c11) seems to imply this
is on purpose:
if (mc) {
if (!lazy && strcmp(mc->m.mnt_type, "nfs4") != 0)
/* We ignore the error from nfs_umount23.
* If the actual umount succeeds (in del_mtab),
* we don't want to signal an error, as that
* could cause /sbin/mount to retry!
*/
nfs_umount23(mc->m.mnt_fsname, mc->m.mnt_opts);
ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir) ?: ret;
} else if (*spec != '/') {
if (!lazy)
ret = nfs_umount23(spec, "tcp,v3");
The description of this option seems to imply than he filesystem is
marked as unmounted right now in mtab, and than he is actually umounted
properly as soon as possible. This doesn't says anything about the
server, tough, and I doesn't see anything in the code dealing with this
'as soon as possible' event anyway...
A mandriva user report than unmount filesystem at shutdown is broken
since the move of {mount,unmount}.nfs commands from coreutils to
nfs-utils, some times ago:
https://qa.mandriva.com/show_bug.cgi?id=36490
It seems to be caused by the use of -l option in initscripts, which
apparently don't send an umount request to the server anymore. A simple
test is enough to confirm it:
When using 'mount.nfs server:/dir dir && umount.nfs dir' on the client,
the server logs:
Jan 17 14:01:12 mountd[18714]: authenticated mount request from
192.168.0.1:840 for /home (/home)
Jan 17 14:01:12 mountd[18714]: authenticated unmount request from
192.168.0.1:1012 for /home (/home)
When using 'mount.nfs server:/dir dir && umount.nfs dir -l' on the
client, the server logs:
Jan 17 14:09:17 mountd[18714]: authenticated mount request from
192.168.0.1:955 for /home (/home)
The filesystem is umounted client-side, but the server still thinks he
is connected:
[root at oberkampf Desktop]# showmount
Hosts on oberkampf:
192.168.0.1
client uses nfs-utils 1.2.0.
Reading the code in nfsumount.c, as suggested by comment #11
(https://qa.mandriva.com/show_bug.cgi?id=36490#c11) seems to imply this
is on purpose:
if (mc) {
if (!lazy && strcmp(mc->m.mnt_type, "nfs4") != 0)
/* We ignore the error from nfs_umount23.
* If the actual umount succeeds (in del_mtab),
* we don't want to signal an error, as that
* could cause /sbin/mount to retry!
*/
nfs_umount23(mc->m.mnt_fsname, mc->m.mnt_opts);
ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir) ?: ret;
} else if (*spec != '/') {
if (!lazy)
ret = nfs_umount23(spec, "tcp,v3");
The description of this option seems to imply than he filesystem is
marked as unmounted right now in mtab, and than he is actually umounted
properly as soon as possible. This doesn't says anything about the
server, tough, and I doesn't see anything in the code dealing with this
'as soon as possible' event anyway...
--
BOFH excuse #289:
Interference between the keyboard and the chair.
BOFH excuse #289:
Interference between the keyboard and the chair.