<div dir="ltr"><div><div><div><div>All,<br><br></div>I'm using fedora20. fresh install. I start with an empty volume group, vg-targetd<br><br></div>I've included some python code that reproduces the hang.<br><br></div>the script creats 11 logical volumes. attaches them to the BlockStorageObject from the rtslib. iscsi...<br><br></div>then we go in to a loop calling lvscan() about the 42 iteration, the program will hang with lvmetad going 100% cpu<br><div><div><div><br></div><div>using the lvm lib, I don't have this issue. <br><br></div><div>thanks<br><br>Jeffrey<br><br><br></div><div><br>#!/usr/bin/python<br>from lvm2py import *<br>from rtslib import BlockStorageObject<br><br>lvm = LVM()<br>vg_list_obj  = lvm.vgscan()<br>lv_list_obj  = {}<br>target_count = 12<br>volume_size  = 1<br>vg_name      = 'vg-targetd'<br>volume_name  = "test_volume_%s"<br><br>for i in range (1,target_count):<br>  lv_name = volume_name % (str(i).zfill(2))<br>  so_name = "%s:%s" % (vg_name, lv_name)<br>  vg = lvm.get_vg(vg_name, 'w')<br>  vg.create_lv(lv_name, volume_size, 'GiB')<br>  storageblock_obj = BlockStorageObject(so_name, dev="/dev/%s/%s" % (vg_name, lv_name))<br>  print 'created volume ', lv_name<br><br>i = 1<br>while i < 300:<br>    vg = lvm.get_vg(vg_name, 'r')<br>    lv_list_obj = vg.lvscan()<br>    output = []<br>    for lv in lv_list_obj:<br>        output.append(dict(volume_name=<a href="http://lv.name">lv.name</a>, size=int(lv.size()), uuid=lv.uuid))<br>    print output<br>    print i<br>    i = i + 1<br><br><br># hangs after 42 iterations with 12 volumes<br><br></div><div><br><br></div></div></div></div>