LVM_PVSCAN_ON_LVS and layered VGs

Rob Leslie <[email protected]> Thu, 21 Aug 2025 18:11:40 -0700
Newsgroups gmane.linux.lvm.general
Message-ID <[email protected]>
> ### Changes to device handling
>=20
> * **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=20
SUBSYSTEM=3D=3D"block", ACTION=3D=3D"add", =
ENV{ID_FS_TYPE}=3D=3D"LVM2_member", ENV{DM_UUID}=3D=3D"LVM-?*", =
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=3D"0", ENV{LVM_PVSCAN_ON_LVS}=3D"1"

I found it wasn=E2=80=99t 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 =E2=80=9Cvmpool=E2=
=80=9D and make this a PV for a separate =E2=80=9Cvmpool=E2=80=9D VG. =
This has been my practice for probably at least 15 years.

Greetings,

--=20
Rob Leslie
[email protected]