File 0121-udev-md-raid-assembly.rules-skip-if-DM_UDEV_DISABLE_.patch of Package mdadm.30550
From 9e67cb85d6d2aeab773aab56b8b6cdf5b37c1a4e Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Wed, 16 Feb 2022 21:48:52 +0100
Subject: [PATCH] udev-md-raid-assembly.rules: skip if
DM_UDEV_DISABLE_OTHER_RULES_FLAG
device-mapper sets the flag DM_UDEV_DISABLE_OTHER_RULES_FLAG to 1 for
devices which are unusable. They may be no set up yet, suspended, or
otherwise unusable (e.g. multipath maps without usable path). This
flag does not necessarily imply SYSTEMD_READY=0 and must therefore
be tested separately.
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
udev-md-raid-assembly.rules | 3 +++
1 file changed, 3 insertions(+)
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index d668cdd..bc9679f 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -9,6 +9,9 @@ SUBSYSTEM!="block", GOTO="md_inc_end"
# skip non-initialized devices
ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
+# device mapper sets DM_UDEV_DISABLE_OTHER_RULES_FLAG for devices which
+# aren't ready to use
+KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="md_inc_end"
# handle potential components of arrays (the ones supported by md)
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
--
2.35.1