Bug 73634

Summary: mount problem with duplicate labels
Product: [Retired] Red Hat Linux Reporter: Emmanuel Kowalski <emmanuel.kowalski>
Component: mountAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-09-07 10:54:22 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 Emmanuel Kowalski 2002-09-07 10:54:16 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/0

Description of problem:
When there is more than one ext2/3 partitions with the same label, the
``wrong one'' may be mounted, and in addition /etc/mtab may
get wrong information.


Version-Release number of selected component (if applicable):
mount-2.11n-12

How reproducible:
Always

Steps to Reproduce:
1. One needs two partitions with the same LABEL (in my case, on two
hard drives, both of which have one with LABEL=/ and one with LABEL=/data),
which is referenced in /etc/fstab only once.
2. Boot the system
3. Look at output of df and cat /etc/mtab
	

Actual Results:  
1. In my case, after boot the /data partition was mounted from the
second hard drive;
2. But the root partition was mounted from the first (correctly...);
3. And yet df and /etc/mtab indicate that the root partition from the
second hard drive is mounted

Expected Results:  
1. For the /data partition, I was surprised, but I guess this is 
understandable, although maybe a message during mount might have been
helpful
2. For the second, although it's good that the correct root partition
is mounted, this should also be indicated in /etc/mtab


Additional info:

This is a possible issue when using a hard-drive from one computer
on another one, since many partitions would then have duplicate
labels. In the case above, the second root partition contains 
/usr, /home, /usr/local, so I don't know what would happen in
case those were separate. This might be a problem, or simply
something surprising.

/dev/hda is the main HD, with the ``right'' root partition
/dev/hdd is a second HD from another RH 7.3 computer.

Version of mount :
mount-2.11n-12

It looks like this could be related to bugs 72019 and/or 57286.

Comment 1 Elliot Lee 2002-09-11 18:26:23 UTC
If you are mounting by label, and you have two partitions with the same label, the results 
are undefined. In general, "don't do that". The 'hard drive from another computer' case is 
unfortunate, but controllable.