From 6e6d4c62b34b95d0e96f3d9258434096c7ba4844 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Mon, 3 Jun 2024 12:07:07 +0200 Subject: [PATCH] udev: ignore private LVM devs in udev and systemd We automatically ignore these devs, when lvm2 create devs, whoever when lvm2 database is dropped or someone just created these devs with such formated UUID, there is no other informantion then to check DM UUID. --- udev/11-dm-lvm.rules.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in index cfc022489..a6d4b956d 100644 --- a/udev/11-dm-lvm.rules.in +++ b/udev/11-dm-lvm.rules.in @@ -34,6 +34,9 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", ENV{.DM_NOSCAN}="1", ENV{DM_UDEV_DISABLE_OTHE ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end" +# Ignore private devices - the ones having any suffix in DM_UUID. Both in udev rules and in systemd. +ENV{DM_UUID}=="LVM-?*-?*", ENV{SYSTEMD_READY}="0", GOTO="lvm_disable" + # Do not create symlinks for inappropriate subdevices. ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable" ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"