Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 252016 - LVM2 counts mirror subdevices as logical volumes
LVM2 counts mirror subdevices as logical volumes
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Alasdair Kergon
Depends On:
  Show dependency treegraph
Reported: 2007-08-13 15:47 EDT by Nate Straz
Modified: 2008-07-24 16:07 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2008-0776
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 16:07:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0776 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2008-07-23 13:19:45 EDT

  None (edit)
Description Nate Straz 2007-08-13 15:47:17 EDT
Description of problem:

When a mirror volume exists, the number of logical volumes that `vgs` displays
is equal to the number of device mapper devices instead of the number of logical

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. lvcreate -m 2 -n mirror vgname
2. vgs
Actual results:

[root@tank-01 ~]# vgs
  VG           #PV #LV #SN Attr   VSize   VFree  
  VolGroup00     1   2   0 wz--n-  37.16G  64.00M
  tank-cluster   4   5   0 wz--nc 915.70G 615.70G
[root@tank-01 ~]# lvs
  LV       VG           Attr   LSize   Origin Snap%  Move Log         Copy% 
  LogVol00 VolGroup00   -wi-ao  35.16G                                      
  LogVol01 VolGroup00   -wi-ao   1.94G                                      
  mirror   tank-cluster mwi-ao 100.00G                    mirror_mlog  10.29
[root@tank-01 ~]# dmsetup ls
tank--cluster-mirror    (253, 6)
tank--cluster-mirror_mlog       (253, 2)
tank--cluster-mirror_mimage_2   (253, 5)
tank--cluster-mirror_mimage_1   (253, 4)
tank--cluster-mirror_mimage_0   (253, 3)
VolGroup00-LogVol01     (253, 1)
VolGroup00-LogVol00     (253, 0)

Expected results:

[root@tank-01 ~]# vgs
  VG           #PV #LV #SN Attr   VSize   VFree  
  VolGroup00     1   2   0 wz--n-  37.16G  64.00M
  tank-cluster   4   1   0 wz--nc 915.70G 615.70G

Additional info:
Comment 1 Jonathan Earl Brassow 2008-03-26 14:17:33 EDT
The subdevices are logical volumes... but are not generally shown via 'lvs'.  If
you try 'lvs -a', then you will see the underlying logical volumes as well.

I'm not sure why the chose to count the 'non-visible' volumes, but I don't think
their way is wrong either...
Comment 2 Alasdair Kergon 2008-04-10 12:43:43 EDT
Didn't notice this bz, but hidden LVs should not be included in the totals, so 
it is a bug if that's the output you're still seeing, and it needs fixing.
Comment 3 Alasdair Kergon 2008-04-10 13:18:33 EDT
fixed in 2.02.34
Comment 4 RHEL Product and Program Management 2008-04-10 13:28:15 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 7 Corey Marthaler 2008-06-27 15:18:53 EDT
Fix verified in lvm2-2.02.37-3.el4.
Comment 9 errata-xmlrpc 2008-07-24 16:07:28 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. 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.