That is in fact a LVM limitation of the default config that is targetted
at low multi-scanning and general compatibility with older setups.
You'll find in /etc/lvm/lvm.conf a disabled line like:
# filter = [ "a|.*/|" ]
That means that it will consider /dev/* but not more - in particular not
/dev/disk/by-...
If you configure lvm to consider the paths you want (it will pick up the first
it finds with metadata, so I made it ONLY by path)
filter =[ "a|/dev/disk/by-path/.*|" ]
I wasn't sure what to reload, so I restarted all (might be too much)
$ sudo systemctl restart lvm2-lvmetad.service lvm2-monitor.service
lvm2-lvmpolld.service
Now things work as you expected:
$ sudo /sbin/pvcreate /dev/disk/by-path/virtio-pci-0000:00:07.0
Physical volume "/dev/disk/by-path/virtio-pci-0000:00:07.0" successfully
created.
ubuntu@cosmic-storage-pools:~$ sudo pvdisplay
"/dev/disk/by-path/pci-0000:00:07.0" is a new physical volume of "30.00 MiB"
--- NEW Physical volume ---
PV Name /dev/disk/by-path/pci-0000:00:07.0
VG Name
PV Size 30.00 MiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID mwk7tq-fZ1C-zElW-u0Qy-KlqJ-PUK0-BVHOpz
That would fix things on the LVM side to be as libvirt expects.
Interestingly libvirt still can't start the pool now.
Haven't looked yet further, need to check what and how it parses in libvirt to
get to the conclusion that it is not existing.
As now pvs looks like:
$ sudo /sbin/pvs --noheadings -o pv_name,vg_name
/dev/disk/by-path/pci-0000:00:07.0 testpool1
** Changed in: libvirt (Ubuntu)
Status: Invalid => Incomplete
** Changed in: lvm2 (Ubuntu)
Status: New => Invalid
--
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