Hi Jan,
to reproduce I started a KVM guest with two extra disks:
$ sudo qemu-img create -f qcow2
/var/lib/libvirt/images/test-storage-pools-1.img 30M
$ sudo qemu-img create -f qcow2
/var/lib/libvirt/images/test-storage-pools-2.img 30M
Add to the guest like:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/test-storage-pools-1.img'/>
<backingStore/>
<target dev='vdc' bus='virtio'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/test-storage-pools-2.img'/>
<backingStore/>
<target dev='vdd' bus='virtio'/>
</disk>
This is fix on PCI slot 7 and 8.
So on by-path I can rely on
lrwxrwxrwx 1 root root 9 Nov 6 12:02 virtio-pci-0000:00:07.0 -> ../../vdc
lrwxrwxrwx 1 root root 9 Nov 6 12:02 virtio-pci-0000:00:08.0 -> ../../vdd
Since https://libvirt.org/storage.html#StorageBackendLogical doesn't need host
and dir path I didn't define those.
I used:
$ virsh pool-define-as --print-xml testpool1 logical --source-dev
virtio-pci-0000:00:07.0 --target /dev/testpoolVG
<pool type='logical'>
<name>testpool1</name>
<source>
<device path='virtio-pci-0000:00:07.0'/>
</source>
<target>
<path>/dev/testpoolVG</path>
</target>
</pool>
$ sudo virsh pool-define-as testpool1 logical --source-dev
virtio-pci-0000:00:07.0 --target /dev/testpoolVG
$ sudo virsh pool-define-as testpool2 logical --source-dev /dev/vdd --target
/dev/testpoolVG2
Already on pool-build I see it missing the by path device
$ sudo virsh pool-build testpool1
error: Failed to build pool testpool1
error: Storage pool probe failed: Failed to create filesystem probe for device
virtio-pci-0000:00:07.0
$ sudo virsh pool-build testpool2
Pool testpool2 built
The same is true if I pool-build one defined with the syntax you used:
$ sudo virsh pool-define-as testpool2 logical - - virtio-pci-0000:00:08.0
/dev/testpoolVG2
Related log message of the daemon:
libvirtd[6311]: 6315: error : virStorageBackendBLKIDFindEmpty:3130 : Storage
pool probe failed: Failed to create filesystem probe for device
virtio-pci-0000:00:07.0
If we enable debug we see this before:
debug: virStorageBackendBLKIDFindEmpty:3125 : Probe for existing
filesystem/partition format LVM2_member on device virtio-pci-0000:00:07.0
In the case of the working /dev/vdd it uses a full path in this call:
debug: virStorageBackendBLKIDFindEmpty:3125 : Probe for existing
filesystem/partition format LVM2_member on device /dev/vdd
Now it is not the code of libvirt on pool-build that "looses" that information.
No if we look more carefully at the XML that was defined it is:
<device path='virtio-pci-0000:00:07.0'/>
Silly me :-/ I forgot the full path in the definition
Redefine as:
$ sudo virsh pool-define-as testpool1 logical --source-dev
/dev/disk/by-path/virtio-pci-0000:00:07.0 --target /dev/testpoolVG
Yeah that looks better:
$ sudo virsh pool-dumpxml testpool1
<pool type='logical'>
<name>testpool1</name>
<uuid>d85ec218-9b82-4f99-8b75-6b11840d06b5</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
<device path='/dev/disk/by-path/virtio-pci-0000:00:07.0'/>
<name>testpool1</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/testpool1</path>
</target>
</pool>
$ sudo virsh pool-build testpool1
Pool testpool1 built
Ok now I can build the by-path pool as well (as you did without the
silly mistake in between).
$ sudo virsh pool-start testpool1
error: Failed to start pool testpool1
error: unsupported configuration: cannot find any matching source devices for
logical volume group 'testpool1'
$ sudo virsh pool-start testpool2
Pool testpool2 started
So far - confirming your report
** Changed in: libvirt (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1801918
Title:
storage pool with persistent device names fails
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1801918/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs