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 volumes. Version-Release number of selected component (if applicable): lvm2-2.02.21-5.el4 lvm2-cluster-2.02.21-7.el4 How reproducible: 100% 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:
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...
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.
fixed in 2.02.34
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 release.
Fix verified in lvm2-2.02.37-3.el4.
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. http://rhn.redhat.com/errata/RHBA-2008-0776.html