Bug 129765 - netfs unmount retries when no nfs mounts exist
Summary: netfs unmount retries when no nfs mounts exist
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
: 149546 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-12 16:05 UTC by Mark Wilkinson
Modified: 2014-03-17 02:47 UTC (History)
2 users (show)

Fixed In Version: 7.62-1
Clone Of:
Environment:
Last Closed: 2004-08-12 16:33:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Wilkinson 2004-08-12 16:05:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040808 Firefox/0.9.3

Description of problem:
the init.d/netfs script retries unmounting NFS filesystems when none
are actually mounted. This delays system shutdown by a few seconds and
produces misleading log messages that might obscure real errors.


Version-Release number of selected component (if applicable):
initscripts-7.55.1-1

How reproducible:
Always

Steps to Reproduce:
1. Start NFS daemon on the machine.
2. Shutdown machine.


Actual Results:  netfs retries unmounting NFS filesystems, even though
none are mounted. These are from boot.log:

Aug  9 18:41:27 sputnik netfs: Unmounting NFS filesystems:  succeeded
Aug  9 18:41:34 sputnik netfs: Unmounting NFS filesystems (retry): 
succeeded
Aug  9 18:41:41 sputnik netfs: Unmounting NFS filesystems (retry): 
succeeded

Expected Results:  Shouldn't need to unmount anything.

Additional info:

I believe this problem occurs when a machine is both an NFS client and
an NFS server. It is due to nfsd being present in /proc/mounts even
after the init.d/nfs script has attempted to shut it down. The
following typescript shows that the awk script from line 96 of
init.d/netfs miscounts the nfsd mount on /proc/fs/nfsd as an nfs
filesystem mounted from another machine, and hence tries to unmount it
repeatedly.

[root@sputnik root]# cat /proc/mounts
rootfs / rootfs rw 0 0
[...]
/proc /proc proc rw,nodiratime 0 0
/sys /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/hda5 /boot ext3 rw 0 0
[...]
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
automount(pid1657) /net autofs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
[root@sputnik root]# LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/"
{print $2}' /proc/mounts
/proc/fs/nfsd
[root@sputnik root]# /etc/init.d/nfs stop
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS quotas:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
[root@sputnik root]# LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/"
{print $2}' /proc/mounts
/proc/fs/nfsd
[root@sputnik root]# 

Probably just a matter of fixing the pattern being matched against
'$3' in the script...

Comment 1 Bill Nottingham 2004-08-12 16:31:08 UTC
Presumably if you change that to && $3 == "nfs" it works?

It's a result of the nfsv4 patch.

Comment 2 Bill Nottingham 2004-08-12 16:33:25 UTC
Fixed in CVS, will be in 7.62-1.

Comment 3 Bill Nottingham 2005-02-23 23:14:04 UTC
*** Bug 149546 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.