Bug 149546 - netfs script does not unmount nfs filesystems correctly
Summary: netfs script does not unmount nfs filesystems correctly
Keywords:
Status: CLOSED DUPLICATE of bug 129765
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 2
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-23 21:32 UTC by Richard Fearn
Modified: 2014-03-17 02:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:08:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Richard Fearn 2005-02-23 21:32:38 UTC
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 }'
/proc/mounts`

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:

/^nfs4?$/

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


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

How reproducible:
Always

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 23:13:55 UTC
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 19:08:13 UTC
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.