Bug 57286 - umount changes /etc/mtab in case of a failure
umount changes /etc/mtab in case of a failure
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: mount (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-08 15:40 EST by jfalk
Modified: 2007-04-18 12:38 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-13 12:32:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix (598 bytes, patch)
2001-12-08 15:45 EST, jfalk
no flags Details | Diff
Improved, less intrusive fix (against mount-2.11g-5). (663 bytes, patch)
2002-07-23 10:11 EDT, diego.santacruz
no flags Details | Diff

  None (edit)
Description jfalk 2001-12-08 15:40:58 EST
Description of Problem:
umount fails but changes /etc/mtab

Version-Release number of selected component (if applicable):
mount-2.11m-1
but versions before this too

How Reproducible:
umount -f -a -t nfs 2>/dev/null

Steps to Reproduce:
1. Mount a nfs share
2. Now use a file on this share on keep on using it.
   This will make the kernel syscall fail with EBUSY.
3. try to umount with 'umount -f -a -t nfs 2>/dev/null'
   don't forget 2>/dev/null it's needed for the failure to
   happen !!!
 
Actual Results:
umount fails but alters /etc/mtab
the entry for the nfs share will have disappeared

Expected Results:
/etc/mtab should not have changed


Additional Information:
Comment 1 jfalk 2001-12-08 15:45:25 EST
Created attachment 40147 [details]
fix
Comment 2 diego.santacruz 2002-07-23 08:19:48 EDT
I can also confirm this problem with mount-2.11g-5.
This also happens when mount is run from initlog, which happens in the
initscripts. Therefore it is not a rarely occuring bug.

As a consequence the "netfs stop" script does not work correctly and leaves NFS
mounts alive when a process is using the mount. The first umount attempt will
erroneously delete the mount entry from /etc/mtab (without having umounted the
fs since it's busy), then the script goes on killing the problematic process,
and the successive "mount -f -a -t nfs" calls will do nothing since no NFS entry
appears in /etc/mtab any longer, leaving the NFS mount alive.

This is serious since, because of this bug, the "netfs stop" script will leave
"hidden" NFS mounts lurking. By "hidden" I mean that mount will not show them,
but they appear in /proc/mounts.

I'm using RedHat 7.2 on a laptop and this is biting me very often (since apm
suspend runs netfs stop). I would appreciate very much if it got fixed and a new
RPM got released for 7.2 and all other versions suffering from this.

Thanks in advance.
Comment 3 diego.santacruz 2002-07-23 10:11:44 EDT
Created attachment 66564 [details]
Improved, less intrusive fix (against mount-2.11g-5).
Comment 4 Elliot Lee 2003-08-13 12:32:26 EDT
This fix appears to be in util-linux-2.11y, so the latest dist release should be fine. I don't 
plan on releasing a 7.x erratum with the fix.

Apologies for the loooong delay.

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