From 17a3585cbb55d9a15ced9775a18b50c53a50ee8e Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 19 Jan 2023 17:37:31 -0600 Subject: pvscan: use alternate device names from DEVLINKS to check filter pvscan --cache is called by our udev rule at a time when all the symlinks for may not be created yet (by other udev rules.) The regex filter in lvm.conf may refer to using a symlink name that hasn't yet been created, which would cause to not match the filter regex. The DEVLINKS env var, set by udev, contains all the symlink names for that have been or will be created. So, we add all these symlink names to dev->aliases, as if we had found them in /dev. This allows to be recognized by a regex filter containing a symlink for . --- man/lvmautoactivation.7_main | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'man') diff --git a/man/lvmautoactivation.7_main b/man/lvmautoactivation.7_main index 808ea0d9f..0f7734557 100644 --- a/man/lvmautoactivation.7_main +++ b/man/lvmautoactivation.7_main @@ -184,6 +184,19 @@ system from booting. A custom systemd service could be written to run autoactivation during system startup, in which case disabling event autoactivation may be useful. . +.SS lvm.conf filter +.P +Device symlinks from /dev/disk/ can be used in the lvm.conf filter to +guard against changes in kernel device names. The /dev/disk/by-path/ or +/dev/disk/by-id/ prefixes should be included in the filter names; these +prefixes help lvm detect that symlink names are used. Filters containing +symlinks require special matching by commands run in the lvm udev rule. +.P +Common symlinks, e.g. beginning with wwn-, scsi-, pci-, or lvm-pv-uuid-, +are recommended. Uncommon or custom symlinks created by custom udev rules +may be less reliable. If a custom udev rule creates symlinks used in the +lvm filter, then the udev rule should be started prior to the lvm rule. +. .SH EXAMPLES .P VG "vg" contains two PVs: -- cgit v1.2.1