Bug 166956 - Unable to activate large count of logical volumes
Unable to activate large count of logical volumes
Status: CLOSED DUPLICATE of bug 164197
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-28 17:38 EDT by Wendy Cheng
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-30 14:13:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wendy Cheng 2005-08-28 17:38:21 EDT
Description of problem:

Customer reports to have created 2 volume groups for TPC-C benchmark test runs.
Each volume group contains large count of logical volumes (in their case, 179 of
each). The first volume group when activated shows that all of the logical
volumes are active/available. However, when activating the logical volumes in
the second volume group, only small set of them (7 out of 179 in their case) are
active. If the first volume group is deactivated, then all of the volume groups
in the second volume group can be successfully activated.

We have recreated the problem in our lab using 200 lv in each group and the max
count of total logical volume can be activated is 388 (expected to have 400).

The odd thing is that it seems to be something to do with the name length. In
our case, we first named the volume group v1 and v2 and we could activate 400
total. Later we changed them to vgvg12345678901 and vgvg23456789012 and found we
could only activate 388 of them. The customer named their vg as vgoracle and
vgoracle_sut.

Our TAM could even recreate this problem using his labtop and loop device. 

Version-Release number of selected component (if applicable):
RHEL 4 U2 Beta

How reproducible:
Seems to be 100% recreatable.

Steps to Reproduce:
(If you need access to my test machine, let me know)
1. Using fdisk to create 2 partitions:

Disk /dev/sdc: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         100      803218   8e  Linux LVM
/dev/sdc2             101         200      803250   8e  Linux LVM

2. # Create PVs, VGs, and LVs.
pvcreate /dev/sdc1
pvcreate /dev/sdc2

vgcreate -s 1M vg1 /dev/sdc1
vgcreate -s 1M vg2 /dev/sdc2

for ((i=0;$i<200;i++)); do
  lvcreate -l 1 -n vol${i} vg1
  lvcreate -l 1 -n vol${i} vg2
done

3. Experiments with "short names" to make sure everything works

# With the short VG names, all these volumes should now be active.
# While running the rest of this test, monitor the number of DM devices,
# as shown in /sys/block/. This should initially print 400 (assuming you
# have no other active DM devices).
while /bin/true; do ls -d /sys/block/dm-* | wc -l; sleep 1; done

# Deactivate both groups. The count of DM devices will eventually fall
# to zero.
vgchange -an vg1 vg2

# Rename both groups, adding one or more characters to the names.
vgrename vg1 vg12
vgrename vg2 vg23

# Reactivate both groups. This should still activate all volumes correctly,
# as shown by the /sys/block/dm-* count.
vgchange -ay vg12 vg23

4. Using the long name to see the issue

# Then deactivate and rename both groups again. In my test system, it look a 15
# character name to hit this bug - it might be slightly different on your
# system.
vgchange -an vg12 vg23
vgrename vg12 vgvg12345678901
vgrename vg23 vgvg23456789012
  
Actual results:
On my test machine, the problem can be repeatedly seen by running the following
loop:

#!/bin/sh
vgchange -a n vgvg23456789012

for ((i=0;$i<200;i++)); do
  lvchange -a y /dev/vgvg23456789012/vol${i}
  ls -d /sys/block/dm-* | wc -l
done

with the following screen output:
root@perf81 tools]# ./myloop
  0 logical volume(s) in volume group "vgvg23456789012" now active
201
202
203
204
205
206
207
...
382
383
384
385
386
387
388
201
202
203
204
205
206
207
208
209
210
211
212


Expected results:
Should be able to activate all of them; or document why and what are the limitation.

Additional info:
Comment 1 Corey Marthaler 2005-08-29 10:31:08 EDT
this looks like bz 164197 and bz 164198.
Comment 2 Alasdair Kergon 2005-08-30 14:13:15 EDT
Yes, closing as a duplicate - the library needs enhancing to support this.


*** This bug has been marked as a duplicate of 164197 ***

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