dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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