Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 159497

Summary: Mounting of LVM partitions by LABEL fails with duplicate error
Product: Red Hat Enterprise Linux 4 Reporter: zweers
Component: mountAssignee: Karel Zak <kzak>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-03 00:06:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description zweers 2005-06-02 23:48:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
I am unable to use ext2 labels to mount lvm based partitions.  It fails with a LABEL=<label> duplicate - not mounted.

It appears to be based on the partition being references in multiple searches in the /proc filesystem for mount points.

Version-Release number of selected component (if applicable):
util-linux-2.12a-16.EL4.6 lvm2-2.00.31-1.0.RHEL4

How reproducible:

Steps to Reproduce:
1. create lvm partition : lvcreate -n test -L 128M lvm0
2. format partition : mke2fs /dev/lvm0/test
3. use e2label to label partition : e2label /dev/lvm0/test testlabel
4. mount LABEL=testlabel /mnt


Actual Results:  # mount LABEL=testlabel /mnt
mount: LABEL=testlabel duplicate - not mounted

Expected Results:  Successful mouting

Additional info:

# strace -eopen mount LABEL=testlabel /mnt
open("/etc/", O_RDONLY)      = 3
open("/lib64/tls/", O_RDONLY)  = 3
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
open("/dev/null", O_RDWR)               = 3
open("/proc/evms/volumes", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/proc/partitions", O_RDONLY)      = 3
open("/dev/sda1", O_RDONLY)             = 4
open("/dev/sda2", O_RDONLY)             = 4
open("/dev/sda3", O_RDONLY)             = 4
open("/dev/sda5", O_RDONLY)             = 4
open("/dev/dm-0", O_RDONLY)             = 4
open("/dev/dm-1", O_RDONLY)             = 4
open("/dev/dm-2", O_RDONLY)             = 4
open("/dev/dm-3", O_RDONLY)             = 4
open("/proc/lvm/VGs", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOENT (No such file or directory)
open("/dev/mapper", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
open("/dev/mapper/lvm0-test", O_RDONLY) = 4
open("/dev/mapper/lvm0-varspoolimap", O_RDONLY) = 4
open("/dev/mapper/lvm0-varlibimap", O_RDONLY) = 4
open("/dev/mapper/lvm0-varlog", O_RDONLY) = 4
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/", O_RDONLY) = -1 ENOENT (No such file or directory)
mount: LABEL=testlabel duplicate - not mounted

Comment 1 zweers 2005-06-02 23:49:15 UTC
Obvious fix is to mount by path and not by label.

Comment 2 Karel Zak 2005-06-03 00:06:55 UTC

*** This bug has been marked as a duplicate of 76467 ***