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:
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
testpool1/dev/testpoolVG
$ 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:
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
testpool1d85ec218-9b82-4f99-8b75-6b11840d06b5000/dev/testpool1
$ 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