You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdadm/SOURCES/mdadm-udev.patch

27 lines
994 B

--- mdadm/udev-md-raid-assembly.rules.orig 2023-01-06 16:37:03.780756100 +0800
+++ mdadm/udev-md-raid-assembly.rules 2023-01-06 17:04:09.536159980 +0800
@@ -5,6 +5,9 @@
ENV{ANACONDA}=="?*", GOTO="md_inc_end"
# assemble md arrays
+# Also don't process disks that are slated to be a multipath device
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_inc_end"
+
SUBSYSTEM!="block", GOTO="md_inc_end"
# skip non-initialized devices
@@ -33,6 +36,13 @@
LABEL="md_inc"
+# Make sure we don't handle dm devices when some limits are set.
+# And linux_raid_member only be set when change/remove event happen.
+# So we don't need to consider add event here.
+KERNEL=="dm-*", ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="md_inc_end"
+KERNEL=="dm-*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="md_inc_end"
+KERNEL=="dm-*", ENV{DM_SUSPENDED}=="1", GOTO="md_inc_end"
+
# Bare disks are ready when add event happens, the raid can be assembled.
ACTION=="change", KERNEL!="dm-*|md*", GOTO="md_inc_end"