Superblocks can be disabled behind AUTO in mdadm.conf. For this situation udev rule still can handle the member disk. But it's not expected. Change the udev rule to check the conf file before handling member disk. Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> --- udev-md-raid-assembly.rules | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules index d4a7f0a5a049..a0f9494f4461 100644 --- a/udev-md-raid-assembly.rules +++ b/udev-md-raid-assembly.rules @@ -16,6 +16,10 @@ ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end" # Then the change event happens. # When adding md/dm devices, ID_FS_TYPE can only be linux_raid_member # after change event happens. +ENV{ID_FS_TYPE}=="linux_raid_member", \ + PROGRAM="/usr/bin/egrep -c ^AUTO.*+1\.x.*-1\.x.*$ /etc/mdadm.conf", GOTO="md_inc" +ENV{ID_FS_TYPE}=="linux_raid_member", \ + PROGRAM="/usr/bin/egrep -c ^AUTO.*-1\.x.*$ /etc/mdadm.conf", GOTO="md_inc_end" ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc" # "noiswmd" on kernel command line stops mdadm from handling @@ -26,9 +30,20 @@ IMPORT{cmdline}="noiswmd" IMPORT{cmdline}="nodmraid" ENV{nodmraid}=="?*", GOTO="md_inc_end" + +ENV{ID_FS_TYPE}=="ddf_raid_member", \ + PROGRAM="/usr/bin/egrep -c ^AUTO.*+ddf.*-ddf.*$ /etc/mdadm.conf", GOTO="md_inc" +ENV{ID_FS_TYPE}=="ddf_raid_member", \ + PROGRAM="/usr/bin/egrep -c ^AUTO.*-ddf.*$ /etc/mdadm.conf", GOTO="md_inc_end" ENV{ID_FS_TYPE}=="ddf_raid_member", GOTO="md_inc" + ENV{noiswmd}=="?*", GOTO="md_inc_end" +ENV{ID_FS_TYPE}=="isw_raid_member", \ + PROGRAM="/usr/bin/egrep -c ^AUTO.*+imsm.*-imsm.*$ /etc/mdadm.conf", GOTO="md_inc" +ENV{ID_FS_TYPE}=="isw_raid_member", \ + PROGRAM="/usr/bin/egrep -c ^AUTO.*-imsm.*$ /etc/mdadm.conf", GOTO="md_inc_end" ENV{ID_FS_TYPE}=="isw_raid_member", ACTION!="change", GOTO="md_inc" + GOTO="md_inc_end" LABEL="md_inc" -- 2.32.0 (Apple Git-132)