[libvirt] storage: pool definition discarded by pool-create failure

lvroyce lvroyce at linux.vnet.ibm.com
Tue Nov 22 02:38:21 UTC 2011


1.how to reproduce:
(1)just use LVM disk,leave libvirt create vg
(2)xml:
<pool type='logical'>
<name>pic_pool2</name>
<source>
<device path='/dev/sdb1'/>
<device path='/dev/sdb2'/>
</source>
<target>
<path>/dev/pic_pool2</path>
</target>
</pool>

(3)steps:
     a.start libvirtd,copy xml
     b.virsh pool-define lvm_pool.xml
     c.virsh pool-list --all
     lvm_pool exsists
     c.virsh pool-create lvm_pool.xml
     lvm_pool disappears

2.analyze:
here pool-create fails because of vg has not been built before 
"vgchange",and pool-create will delete pool-def after failure.
pool-create can fail because a lot of reasons, but it doesn't mean 
previous pool definition should be obselete,previous definition should 
remain unchanged if following pool management fails.

3.fix:
shall we make backend->startPool gurantee pool unchanged in condition of 
start fails or offer an undo function after failure?




More information about the libvir-list mailing list