Bug 496956

Summary: --maxlogicalvolumes if off when counting mirrored volumes
Product: Red Hat Enterprise Linux 4 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Milan Broz <mbroz>
Status: CLOSED NEXTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 4.8CC: agk, dwysocha, edamato, heinzm, jbrassow, mbroz, prockai, pvrabec
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-21 16:22:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2009-04-21 19:49:11 UTC
Description of problem:
This bz is related to bug 490417. 

[root@hayes-01 block]# vgcreate foo -l 4 /dev/etherd/e1.1p*
  Volume group "foo" successfully created

[root@hayes-01 block]# lvcreate -m 1 -n mr1 -L 12M foo
  Logical volume "mr1" created

[root@hayes-01 block]# lvcreate -m 1 -n mr2 -L 12M foo
  Logical volume "mr2" created

[root@hayes-01 block]# lvcreate -m 1 -n mr3 -L 12M foo
  Logical volume "mr3" created

[root@hayes-01 block]# lvcreate -m 1 -n mr4 -L 12M foo
  Maximum number of logical volumes (4) reached in volume group foo
  Failed to create mirror log.

[root@hayes-01 block]# lvcreate -n linear1 -L 12M foo
  Logical volume "linear1" created

[root@hayes-01 block]# lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log      Copy%  Convert
  linear1  foo        -wi-a- 12.00M                                           
  mr1      foo        mwi-a- 12.00M                    mr1_mlog 100.00        
  mr2      foo        mwi-a- 12.00M                    mr2_mlog 100.00        
  mr3      foo        mwi-a- 12.00M                    mr3_mlog 100.00  


Version-Release number of selected component (if applicable):
lvm2-2.02.42-5.el4

How reproducible:
Everytime

Comment 1 Milan Broz 2009-04-21 19:59:43 UTC
The maximal LV count is still more magic than usable restriction...
I plan to fix lv_count properly upstream.

Comment 2 Milan Broz 2009-05-19 11:02:45 UTC
I think this is fixed upstream, see also https://bugzilla.redhat.com/show_bug.cgi?id=490298#c2

Comment 4 Milan Broz 2010-10-21 16:22:04 UTC
This bug should be already fixed in RHEL5 and above but backporting all related changes to RHEL4 introduces too high risk of regression in code.

Comment 5 Corey Marthaler 2010-10-21 21:30:28 UTC
FWIW, this is verified fixed in RHEL5.6.

[root@grant-02 ~]# lvcreate -m 1 -n mr1 -L 12M foo
  Logical volume "mr1" created
[root@grant-02 ~]# lvcreate -m 1 -n mr2 -L 12M foo
  Logical volume "mr2" created
[root@grant-02 ~]# lvcreate -m 1 -n mr3 -L 12M foo
  Logical volume "mr3" created
[root@grant-02 ~]# lvcreate -m 1 -n mr4 -L 12M foo
  Logical volume "mr4" created
[root@grant-02 ~]# lvcreate -m 1 -n mr5 -L 12M foo
  Maximum number of logical volumes (4) reached in volume group foo

2.6.18-227.el5

lvm2-2.02.74-1.el5    BUILT: Fri Oct 15 10:26:21 CDT 2010
lvm2-cluster-2.02.74-1.el5    BUILT: Fri Oct 15 10:27:02 CDT 2010
device-mapper-1.02.55-1.el5    BUILT: Fri Oct 15 06:15:55 CDT 2010
cmirror-1.1.39-10.el5    BUILT: Wed Sep  8 16:32:05 CDT 2010
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009