On Mon, 16 Sep 2024, Steve Keller wrote:
In older Debian releases, I think at least until Debian 9, it was
possible to access PVs and LVs which are stored in a LV. The PV
inside the containing LV could be displayed and activated with
vgdisplay(8) and vgchange(8).
This scenario makes sense if you have a LV for a VM guest, that uses
LVM inside, and when you need to access file systems in the guest from
the host (while the guest is shutdown).
I don't see how this can be done in the current Debian 12.
Steve
Not sure because I've previously battled the opposite problem but I'd
start here in lvm.conf
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
# This is a quick way of filtering out block devices that are
# not
# present on the system. sysfs must be part of the kernel and
# mounted.)
sysfs_scan = 1
# Configuration option devices/scan_lvs.
# Scan LVM LVs for layered PVs, allowing LVs to be used as PVs.
# When 1, LVM will detect PVs layered on LVs, and caution must
# be
# taken to avoid a host accessing a layered VG that may not
# belong
# to it, e.g. from a guest image. This generally requires
# excluding
# the LVs with device filters. Also, when this setting is
# enabled,
# every LVM command will scan every active LV on the system
# (unless
# filtered), which can cause performance problems on systems
# with
# many active LVs. When this setting is 0, LVM will not detect
# or
# use PVs that exist on LVs, and will not allow a PV to be
# created on
# an LV. The LVs are ignored using a built in device filter that
# identifies and excludes LVs.
scan_lvs = 0