Bug 149546 - netfs script does not unmount nfs filesystems correctly
netfs script does not unmount nfs filesystems correctly
Status: CLOSED DUPLICATE of bug 129765
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2005-02-23 16:32 EST by Richard Fearn
Modified: 2014-03-16 22:52 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 14:08:13 EST
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 Richard Fearn 2005-02-23 16:32:38 EST
The netfs script doesn't unmount NFS filesystems correctly, because
the check it performs to see if the NFS filesystems have been
unmounted is flawed.

In this version of initscripts, my netfs script has three awk
invocations on lines 27, 96 and 105. The first of these is:

NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" { print $2 }'

This line selects lines from /proc/mounts where the third field begins
with "nfs". Unfortunately, as well as matching filesystems of type
"nfs" and "nfs4", it also matches "nfsd".

I believe the correct RE is:


which matches either "nfs" or "nfs4", but *not* "nfsd".

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

How reproducible:

Steps to Reproduce:
1. Include some filesystems in /etc/fstab of type nfs
2. Shutdown or restart the system

Actual Results:  netfs retries the unmounting of NFS filesystems
several times before giving up, because it (incorrectly) believes
filesystems of type nfs are still mounted.

Expected Results:  netfs should successfully unmount nfs filesystems
after just one attempt.

Additional info:

The workaround I have used is to change the three REs as described above.
Comment 1 Bill Nottingham 2005-02-23 18:13:55 EST
This was fixed in initscripts-7.62-1. I don't think it will be
backported as of now.

*** This bug has been marked as a duplicate of 129765 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:08:13 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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