[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]