Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 129765 - netfs unmount retries when no nfs mounts exist
netfs unmount retries when no nfs mounts exist
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: 149546 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-08-12 12:05 EDT by Mark Wilkinson
Modified: 2014-03-16 22:47 EDT (History)
2 users (show)

See Also:
Fixed In Version: 7.62-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-12 12:33:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mark Wilkinson 2004-08-12 12:05:19 EDT
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):

How reproducible:

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): 
Aug  9 18:41:41 sputnik netfs: Unmounting NFS filesystems (retry): 

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

[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
[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
[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 12:31:08 EDT
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 12:33:25 EDT
Fixed in CVS, will be in 7.62-1.
Comment 3 Bill Nottingham 2005-02-23 18:14:04 EST
*** 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.