When an array is assembled incrementally, systemd might see it
before it is ready, try to mount it, fail, and give up.
Result is that array doesn't get mounted.
If we ask udev to tell systemd that it isn't ready yet in this
case, systemd waits until it is ready, and all are happy.
Signed-off-by: NeilBrown <neilb@suse.de>
# never leave state 'inactive'
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
TEST!="md/array_state", GOTO="md_end"
-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
+ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
LABEL="md_ignore_state"
IMPORT{program}="/sbin/mdadm --detail --export $tempnode"