On 2012年04月27日 11:06, david_zhu wrote:
Hi, all,
I have 3 XMLs for defining iSCSI pools.
i1.xml and i3.xml are configured to the same iSCSI target, and i2.xml
uses another.
virsh will report error if I define pool "i3" after I have defined the
pool "i1",
but it is OK after defining the pool "i2".
Does anyone known this problem?
My commands are as following:
-bash-4.1# virsh version
Compiled against library: libvir 0.9.11
Using library: libvir 0.9.11
Using API: QEMU 0.9.11
Running hypervisor: QEMU 0.14.1
-bash-4.1# virsh pool-define i1.xml
Pool i1 defined from i1.xml
-bash-4.1# virsh pool-define i3.xml
error: Failed to define pool from i3.xml
error: operation failed: Storage source conflict with pool: 'i1'
-bash-4.1# virsh pool-define i2.xml
Pool i2 defined from i2.xml
-bash-4.1# virsh pool-define i3.xml
Pool i3 defined from i3.xml
and my XMLs are:
-bash-4.1# cat i1.xml
<pool type='iscsi'>
<name>i1</name>
<source>
<host name='192.168.58.160'/>
<device path='iqn.2011-01.com.usi:storage.iscsi1'/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
-bash-4.1# cat i2.xml
<pool type='iscsi'>
<name>i2</name>
<source>
<host name='192.168.58.160'/>
<device path='iqn.2011-01.com.usi:storage.iscsi2'/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
-bash-4.1# cat i3.xml
<pool type='iscsi'>
<name>i3</name>
<source>
<host name='192.168.58.160'/>
<device path='iqn.2011-01.com.usi:storage.iscsi1'/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
Definitely it's a bug, I think the patch posted to libvir list
right now fixes the problem.
https://www.redhat.com/archives/libvir-list/2012-April/msg01491.html
Osier