RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 613987 - lvm should prefer /dev/vg/lv names before /dev/dm-X in reports
Summary: lvm should prefer /dev/vg/lv names before /dev/dm-X in reports
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-13 12:49 UTC by Milan Broz
Modified: 2013-03-01 04:09 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.72-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:08:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milan Broz 2010-07-13 12:49:38 UTC
Description of problem:

I have several machines, including LUKS encrypted RHEL6.

When I want to work with PV/LVs there, all reporting commands use volatile /dev/dm-X instead of user readable name.

Version-Release number of selected component (if applicable):
lvm2-2.02.69-2.el6.x86_64

How reproducible:

# cryptsetup luksOpen /dev/sdb2 rhel6_pv
Enter passphrase for /dev/sdb2: 
# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg_berry2" using metadata type lvm2
...
# pvs
  PV         VG              Fmt  Attr PSize   PFree  
  /dev/dm-6  vg_berry2       lvm2 a-   148.52g   4.00m
...
# vgchange -a y vg_berry2
  3 logical volume(s) in volume group "vg_berry2" now active

# lvs -o lv_name,vg_name,devices vg_berry2
  LV      VG        Devices         
  lv_home vg_berry2 /dev/dm-6(14252)
  lv_root vg_berry2 /dev/dm-6(0)    
  lv_swap vg_berry2 /dev/dm-6(12800)

Expected results:

It should internally prefer names.aliases in this order:
/dev/vg/lv
/dev/mapper/something (/dev/mapper/rhel6_pv here)
/dev/dm-X

Additional info:
Vivat udev.

Comment 2 RHEL Program Management 2010-07-15 14:25:10 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Peter Rajnoha 2010-08-03 13:43:29 UTC
The fix is in the upstream now. The built-in preference rules now try to achieve the ordering:

  /dev/block/* < /dev/dm-* < /dev/disk/* < /dev/mapper/* < anything else

This way, we should see reasonable names in pvs output (as an example). Scheduled for 2.02.73 upstream release.

Comment 6 Corey Marthaler 2010-08-25 20:33:35 UTC
Fix verified in the latest rpms.
2.6.32-59.1.el6.x86_64

lvm2-2.02.72-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
lvm2-libs-2.02.72-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
lvm2-cluster-2.02.72-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
udev-147-2.22.el6    BUILT: Fri Jul 23 07:21:33 CDT 2010
device-mapper-1.02.53-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
device-mapper-libs-1.02.53-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
device-mapper-event-1.02.53-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
device-mapper-event-libs-1.02.53-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010
cmirror-2.02.72-8.el6    BUILT: Wed Aug 18 10:41:52 CDT 2010



[root@taft-02 ~]# pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda2  vg_taft02 lvm2 a-    67.75g      0
  /dev/sdb1  taft      lvm2 a-   135.66g 135.57g
  /dev/sdc1  taft      lvm2 a-   135.66g 135.57g
  /dev/sdd1  taft      lvm2 a-   135.66g 135.57g
  /dev/sde1  taft      lvm2 a-   135.66g 135.57g
  /dev/sdf1  taft      lvm2 a-   135.66g 135.66g
  /dev/sdg1  taft      lvm2 a-   135.66g 135.66g
  /dev/sdh1  taft      lvm2 a-   135.66g 135.66g


[root@taft-02 ~]# lvs -a -o +devices
  LV                VG        Attr   LSize   Origin Snap%  Move Log         Copy%  Convert Devices
  mirror            taft      mwi-a- 100.00m                    mirror_mlog 100.00         mirror_mimage_0(0),mirror_mimage_1(0),mirror_mimage_2(0),mirror_mimage_3(0)
  [mirror_mimage_0] taft      iwi-ao 100.00m                                               /dev/sdb1(0)
  [mirror_mimage_1] taft      iwi-ao 100.00m                                               /dev/sdc1(0)
  [mirror_mimage_2] taft      iwi-ao 100.00m                                               /dev/sdd1(0)
  [mirror_mimage_3] taft      iwi-ao 100.00m                                               /dev/sde1(0)
  [mirror_mlog]     taft      lwi-ao   4.00m                                               /dev/sdh1(0)
  lv_home           vg_taft02 -wi-ao  25.64g                                               /dev/sda2(8269)
  lv_root           vg_taft02 -wi-ao  32.30g                                               /dev/sda2(0)
  lv_swap           vg_taft02 -wi-ao   9.81g                                               /dev/sda2(14832)

Comment 7 releng-rhel@redhat.com 2010-11-10 21:08:25 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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