[linux-lvm] lvm2 lvmetad hangs with 100% cpu

Pirate Fibonacci pirate112358 at gmail.com
Tue Sep 9 21:40:43 UTC 2014


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/40ed2d12/attachment.htm>


More information about the linux-lvm mailing list