mirror_zfs/contrib
Friedrich Weber 047803e906
contrib/initramfs: use LVM autoactivation for activating VGs (#17125)
Currently, the zfs initramfs-tools boot script under local-top calls
`vgchange -ay`, which unconditionally activates all logical volumes
(LVs) in all discovered volume groups (VGs). This causes all LVs to be
active after boot. However, users may prefer to not activate certain
VGs/LVs on boot. They might normally use the `--setautoactivation n`
VG/LV flag or the `auto_activation_volume_list` LVM config option to
achieve this, but since the script unconditionally activates all LVs,
neither has an effect.

To fix this, call `vgchange -aay` instead. This triggers LVM
autoactivation, which honors autoactivation settings such as the
`--setautoactivation` flag. It is also more in line with the LVM
documentation, which says autoactivation is "meant to be used by
activation commands that are run automatically by the system" [1].

Note that this change might break misconfigured setups that have ZFS
on top of an LV for which autoactivation is disabled.

[1] https://gitlab.com/lvmteam/lvm2/-/blob/cff93e4d/conf/example.conf.in#L1579


Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2025-04-01 16:07:46 -07:00
..
bash_completion.d Updating bash completion build file 2024-08-08 15:39:25 -07:00
bpftrace Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
coverity Coverity Model Update 2022-11-29 10:00:56 -08:00
debian Bump SONAME of libzfs and libzpool 2024-10-06 14:49:33 -07:00
dracut dracut: support mountpoint=legacy for root dataset 2023-08-08 09:38:34 -07:00
initramfs contrib/initramfs: use LVM autoactivation for activating VGs (#17125) 2025-04-01 16:07:46 -07:00
intel_qat Add intel_QAT patches 2020-09-30 13:17:30 -07:00
pam_zfs_key SPDX: license tags: BSD-3-Clause 2025-03-13 17:56:50 -07:00
pyzfs SPDX: license tags: Apache-2.0 2025-03-13 17:57:05 -07:00
zcp Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
Makefile.am Fix missing packaging files from release tarballs 2024-10-04 11:18:08 -07:00