Bug 27677 - mount(8) allows a second mount on /
Summary: mount(8) allows a second mount on /
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mount
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-14 22:35 UTC by Steve Bonneville
Modified: 2007-04-18 16:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-06-11 16:11:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Steve Bonneville 2001-02-14 22:35:58 UTC
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
/tmp!

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 16:11:00 UTC
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 14:17:48 UTC
It's a feature.



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