> ### Changes to device handling
>
> * **IMPORTANT:** When `devices/scan_lvs` is enabled found LVs are no longer
> auto
> activated, must enable `LVM_PVSCAN_ON_LVS` in udev rules
> (*69-dm-lvm.rules*.)
I got bit by this upon upgrading a system to Debian 13 (trixie). I could not
find an example of how to accomplish this, however what ended up working for me
looks like this:
% cat /etc/udev/rules.d/68-lvm.rules
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="LVM2_member",
ENV{DM_UUID}=="LVM-?*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="0",
ENV{LVM_PVSCAN_ON_LVS}="1"
I found it wasn’t enough just to set LVM_PVSCAN_ON_LVS; it was also necessary
to (un)set DM_UDEV_DISABLE_OTHER_RULES_FLAG.
Is this the intended and most efficient method to re-enable auto activation for
layered VGs?
> * NOTE: It is not recommended to use LVs for PVs. If you have an use case
> for
> this talk to us, please.
My use case is I want to have a separate VG for virtual machine storage that I
can pass to libvirt to manage LV creation and deletion. Rather than create this
VG from raw partitions, however, I want to be able to allocate this space from
an existing VG. So I create a LV “vmpool” and make this a PV for a separate
“vmpool” VG. This has been my practice for probably at least 15 years.
Greetings,
--
Rob Leslie
[email protected]