udev-md-raid-assembly.rules: skip if DM_UDEV_DISABLE_OTHER_RULES_FLAG
PATCH v2 1/1 udev-md-raid-assembly.rules: skip if DM_UDEV_DISABLE_OTHER_RULES_FLAG
From: Martin Wilck <[email protected]>
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 <[email protected]>
---
Changes in v2:
- Moved the check further up; DM_UDEV_DISABLE_OTHER_RULES_FLAG must be checked before ID_FS_TYPE to be effective
--- udev-md-raid-assembly.rules | 3 +++ 1 file changed, 3 insertions(+)
udev-md-raid-assembly.rules +3 -0
@@ -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"
Signature · 1 line
2.35.1