* [mdadm PATCH] udev-md-raid-assembly.rules: Skip non-ready devices
@ 2017-03-27 0:15 NeilBrown
2017-03-28 18:22 ` jes.sorensen
0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2017-03-27 0:15 UTC (permalink / raw)
To: Jes Sorensen; +Cc: Linux-RAID, Hannes Reinecke
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
From: Hannes Reinecke <hare@suse.de>
If a device isn't fully initialized (e.g if it should be
handled by multipathing) it should not be considered for
md/RAID auto-assembly. Doing so can cause incorrect results
such as causing multipath to fail during startup.
There is a convention that the udev environment variable
SYSTEMD_READY be set to zero for such devices. So change
the mdadm rules to ignore devices with SYSTEMD_READY==0.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: NeilBrown <neilb@suse.com>
---
udev-md-raid-assembly.rules | 3 +++
1 file changed, 3 insertions(+)
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index d0d440a6394c..8ca232a44b1f 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -7,6 +7,9 @@ ENV{ANACONDA}=="?*", GOTO="md_inc_end"
SUBSYSTEM!="block", GOTO="md_inc_end"
+# skip non-initialized devices
+ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
+
# handle potential components of arrays (the ones supported by md)
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
--
2.12.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [mdadm PATCH] udev-md-raid-assembly.rules: Skip non-ready devices
2017-03-27 0:15 [mdadm PATCH] udev-md-raid-assembly.rules: Skip non-ready devices NeilBrown
@ 2017-03-28 18:22 ` jes.sorensen
0 siblings, 0 replies; 2+ messages in thread
From: jes.sorensen @ 2017-03-28 18:22 UTC (permalink / raw)
To: NeilBrown; +Cc: Linux-RAID, Hannes Reinecke
NeilBrown <neilb@suse.com> writes:
> From: Hannes Reinecke <hare@suse.de>
>
> If a device isn't fully initialized (e.g if it should be
> handled by multipathing) it should not be considered for
> md/RAID auto-assembly. Doing so can cause incorrect results
> such as causing multipath to fail during startup.
>
> There is a convention that the udev environment variable
> SYSTEMD_READY be set to zero for such devices. So change
> the mdadm rules to ignore devices with SYSTEMD_READY==0.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
> udev-md-raid-assembly.rules | 3 +++
> 1 file changed, 3 insertions(+)
Applied!
Thanks,
Jes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-28 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 0:15 [mdadm PATCH] udev-md-raid-assembly.rules: Skip non-ready devices NeilBrown
2017-03-28 18:22 ` jes.sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.