90mdraid: fix/adjust 65-md* rules and related scripts
authorMichal Soltys <soltys@ziu.info>
Mon, 5 Sep 2011 22:17:28 +0000 (00:17 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 22 Sep 2011 13:37:26 +0000 (15:37 +0200)
commita025cc17f0d8145492ffbb37735deca208e768bd
treec614acb80809303c20de10f19d0a030173cb413c
parentcf5891424ef026eede69606a918dadf5560095fd
90mdraid: fix/adjust 65-md* rules and related scripts

Reworked the flow of the rules file a bit, removed redundant tests, also
should be easier to follow. It's much shorter now as well, a bit more
similar to 90lvm script - both revolve around same concepts after all.

There's no reason to treat conf-assembled arrays differently from
incremental ones. Once we hit timeout in init's udev loop, we can use
common script (mdraid_start.sh) to try force inactive arrays
into degraded mode.

md-finished.sh was kind-of out of place - it didn't really wait for any
particular device(s) to show up, just watched if onetime mdadm scripts
are still in place. Furthermore, after moving mdraid_start to --timeout
initqueue, it didn't really have too much to watch at all, besides
mdadm_auto (and that served no purpose, as we do wait for concrete
devices).

Either way, with stock 64-md fixes, current version of 65-md*.rules does
the following:

- limits assembly to certain uuids, if specified
- watch for no ddf/imsm
- if mdadm.conf => setup onetime -As script, without forced --run option
- if !mdadm.conf => incrementally assemble
- for both cases, setup timeout script, run-forcing arrays as a last resort

Signed-off-by: Michal Soltys <soltys@ziu.info>
modules.d/90mdraid/65-md-incremental-imsm.rules
modules.d/90mdraid/md_finished.sh [deleted file]
modules.d/90mdraid/mdadm_auto.sh
modules.d/90mdraid/module-setup.sh
modules.d/90mdraid/parse-md.sh