diff options
author | NeilBrown <neilb@suse.de> | 2012-05-24 11:49:49 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-09-27 16:49:54 +1000 |
commit | b7e05d2373313dd8d0cb687479ad58a88f37d29f (patch) | |
tree | 6fb422937d5e47d6b6c7cbdcb12849a72993ae1e | |
parent | 3b2aad6e8b7fdcaeb3d9471af8de6ff3339291f9 (diff) | |
download | mdadm-b7e05d2373313dd8d0cb687479ad58a88f37d29f.tar.gz |
udev-rules: prevent systemd from mount devices before they are ready.
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>
-rw-r--r-- | udev-md-raid.rules | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/udev-md-raid.rules b/udev-md-raid.rules index f564f70..814c897 100644 --- a/udev-md-raid.rules +++ b/udev-md-raid.rules @@ -28,7 +28,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state" # 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" |