90mdraid: fix/adjust force-run script
authorMichal Soltys <soltys@ziu.info>
Mon, 5 Sep 2011 22:17:27 +0000 (00:17 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 22 Sep 2011 13:37:25 +0000 (15:37 +0200)
commit66426469d024b7760f59051af287e11ec6a94c1f
tree2dea26eba009ff7f0b8aeec9f9ab123985be9f0e
parent9383421c1cfc5fe1bc94cf3d3194bd96ee503628
90mdraid: fix/adjust force-run script

1) mdadm -As --auto=yes --run 2>&1 | vinfo (removed)

Currently such auto assembly will not complete or force-run partially
assembled arrays. It might assemble "concurrent" separate array and
force-run it, if possible (though the chances of suddenly showing
missing components in this scenario - a script run after udev timeout -
are pretty thin). See [1] for details. Also see #3 below.

2) mdadm -Is --run 2>&1 (removed)

This will only force-run native arrays - arrays in containers will not
be affected. See [1] for details. Also see #3 below.

3) mdadm -R run loop (implicitly handles #1 & #2)

This loop does everywthing that #1 & #2 are expected to do. Thus, the
above invocations are simply redundant and this is the most safe and
flexible option.

Also, it shouldn't be necessary to go under md/ directory, as those are
just symlinks to /dev/md[0-9]*.

Certain checks were changed to strict ones (array state, degraded state)
instead of relying on env tricks.

'cat' was added explicitly to installed programs (it has been used
implicitly in shutdown script either way)

4) mdmon bug

See [1] for details as well. In short - force-run arrays in containers
will not have mdmon started, so we do that manually.

5) stop/run queue magic

Also removed. mdadm -R will only cause change events to the array
itself, and they should not be an issue.

[1] http://article.gmane.org/gmane.linux.raid/35133

Signed-off-by: Michal Soltys <soltys@ziu.info>
modules.d/90mdraid/mdraid_start.sh
modules.d/90mdraid/module-setup.sh
modules.d/90mdraid/parse-md.sh