Bug 252016 - LVM2 counts mirror subdevices as logical volumes
Summary: LVM2 counts mirror subdevices as logical volumes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.5
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-13 19:47 UTC by Nate Straz
Modified: 2008-07-24 20:07 UTC (History)
3 users (show)

Fixed In Version: RHBA-2008-0776
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-24 20:07:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0776 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2008-07-23 17:19:45 UTC

Description Nate Straz 2007-08-13 19:47:17 UTC
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:

Comment 1 Jonathan Earl Brassow 2008-03-26 18:17:33 UTC
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 16:43:43 UTC
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 17:18:33 UTC
fixed in 2.02.34

Comment 4 RHEL Program Management 2008-04-10 17:28:15 UTC
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.

Comment 7 Corey Marthaler 2008-06-27 19:18:53 UTC
Fix verified in lvm2-2.02.37-3.el4.

Comment 9 errata-xmlrpc 2008-07-24 20:07:28 UTC
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


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