dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/udev-md-raid-assembly.rules-Skip-non-ready-devices.patch

2c1b57
From 3a77acd7170199adc690332ded37c41f067c720e Mon Sep 17 00:00:00 2001
2c1b57
From: Hannes Reinecke <hare@suse.de>
2c1b57
Date: Mon, 27 Mar 2017 11:15:44 +1100
2c1b57
Subject: [RHEL7.5 PATCH 019/169] udev-md-raid-assembly.rules: Skip
2c1b57
 non-ready devices
2c1b57
2c1b57
If a device isn't fully initialized (e.g if it should be
2c1b57
handled by multipathing) it should not be considered for
2c1b57
md/RAID auto-assembly.  Doing so can cause incorrect results
2c1b57
such as causing multipath to fail during startup.
2c1b57
2c1b57
There is a convention that the udev environment variable
2c1b57
SYSTEMD_READY be set to zero for such devices.  So change
2c1b57
the mdadm rules to ignore devices with SYSTEMD_READY==0.
2c1b57
2c1b57
Signed-off-by: Hannes Reinecke <hare@suse.de>
2c1b57
Signed-off-by: NeilBrown <neilb@suse.com>
2c1b57
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
2c1b57
---
2c1b57
 udev-md-raid-assembly.rules | 3 +++
2c1b57
 1 file changed, 3 insertions(+)
2c1b57
2c1b57
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
2c1b57
index d0d440a..8ca232a 100644
2c1b57
--- a/udev-md-raid-assembly.rules
2c1b57
+++ b/udev-md-raid-assembly.rules
2c1b57
@@ -7,6 +7,9 @@ ENV{ANACONDA}=="?*", GOTO="md_inc_end"
2c1b57
 
2c1b57
 SUBSYSTEM!="block", GOTO="md_inc_end"
2c1b57
 
2c1b57
+# skip non-initialized devices
2c1b57
+ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
2c1b57
+
2c1b57
 # handle potential components of arrays (the ones supported by md)
2c1b57
 ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
2c1b57
 
2c1b57
-- 
2c1b57
2.7.4
2c1b57