[linux-lvm] lvm2 lvmetad hangs with 100% cpu
Pirate Fibonacci
pirate112358 at gmail.com
Wed Sep 10 00:02:24 UTC 2014
A simpler version that demonstrates bug...
thanks...
from lvm2py import *
lvm = LVM()
vg_list_obj = lvm.vgscan()
target_count = 12
volume_size = 1
vg_name = 'vg-targetd'
volume_name = "test_volume_%s"
for i in range (1,target_count):
lv_name = volume_name % (str(i).zfill(2))
vg = lvm.get_vg(vg_name, 'w')
vg.create_lv(lv_name, volume_size, 'GiB')
print 'created volume ', lv_name
i = 1
while i < 300:
vg = lvm.get_vg(vg_name, 'r')
lv_list_obj = vg.lvscan()
output = []
for lv in lv_list_obj:
output.append(dict(volume_name=lv.name, size=int(lv.size()),
uuid=lv.uuid))
print output
print i
i = i + 1
On Tue, Sep 9, 2014 at 2:40 PM, Pirate Fibonacci <pirate112358 at gmail.com>
wrote:
> All,
>
> I'm using fedora20. fresh install. I start with an empty volume group,
> vg-targetd
>
> I've included some python code that reproduces the hang.
>
> the script creats 11 logical volumes. attaches them to the
> BlockStorageObject from the rtslib. iscsi...
>
> then we go in to a loop calling lvscan() about the 42 iteration, the
> program will hang with lvmetad going 100% cpu
>
> using the lvm lib, I don't have this issue.
>
> thanks
>
> Jeffrey
>
>
>
> #!/usr/bin/python
> from lvm2py import *
> from rtslib import BlockStorageObject
>
> lvm = LVM()
> vg_list_obj = lvm.vgscan()
> lv_list_obj = {}
> target_count = 12
> volume_size = 1
> vg_name = 'vg-targetd'
> volume_name = "test_volume_%s"
>
> for i in range (1,target_count):
> lv_name = volume_name % (str(i).zfill(2))
> so_name = "%s:%s" % (vg_name, lv_name)
> vg = lvm.get_vg(vg_name, 'w')
> vg.create_lv(lv_name, volume_size, 'GiB')
> storageblock_obj = BlockStorageObject(so_name, dev="/dev/%s/%s" %
> (vg_name, lv_name))
> print 'created volume ', lv_name
>
> i = 1
> while i < 300:
> vg = lvm.get_vg(vg_name, 'r')
> lv_list_obj = vg.lvscan()
> output = []
> for lv in lv_list_obj:
> output.append(dict(volume_name=lv.name, size=int(lv.size()),
> uuid=lv.uuid))
> print output
> print i
> i = i + 1
>
>
> # hangs after 42 iterations with 12 volumes
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20140909/eb2db0c4/attachment.htm>
More information about the linux-lvm
mailing list