Bug 27677

Summary: mount(8) allows a second mount on /
Product: [Retired] Red Hat Linux Reporter: Steve Bonneville <sbonnevi>
Component: mountAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-11 16:11:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.