mdadm/mdadm-udev.patch

27 lines
1.1 KiB
Diff
Raw Normal View History

--- mdadm/udev-md-raid-assembly.rules.orig 2022-10-25 08:34:58.137936285 +0800
+++ mdadm/udev-md-raid-assembly.rules 2022-10-25 09:28:23.453154190 +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
@@ -28,6 +31,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"
+
# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
ACTION!="remove", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"