Bug 27677 - mount(8) allows a second mount on /
mount(8) allows a second mount on /
Product: Red Hat Linux
Classification: Retired
Component: mount (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-02-14 17:35 EST by Steve Bonneville
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-06-11 12:11:04 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 Steve Bonneville 2001-02-14 17:35:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686)

It's possible to mount a filesystem on the / mount point even if the mount
point is already in use.  A second entry for the / mount point is then
placed in /etc/mtab! 

Reproducible: Always
Steps to Reproduce:
Given that /dev/hda5 is mounted as / and we have a currently unmounted
filesystem on /dev/hda6:
1. mount /dev/hda6 /
2. cd /; ls
3. ls /tmp

Actual Results:  The `cd /; ls` resulted in a list of the top level of
/dev/hda6.  The `ls /etc` resulted in a list of the original /dev/hda5

The system appeared to continue running normally otherwise.

Expected Results:  We should have had an error after step 1:
"according to mtab, /dev/hda5 is already mounted on /"

For testing purposes, I could apparently untangle the situation by manually
removing the second rogue / entry from /etc/mtab before attempting a
`umount /dev/hda6`.
Comment 1 Helge Deller 2001-06-11 12:11:00 EDT
Hmm, is this really a bug or just a feature ????
No idea, but problem verified with mount-2.11e-1.rpm.
Comment 2 Bernhard Rosenkraenzer 2001-09-11 10:17:48 EDT
It's a feature.

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