Re: Initrd and software raid
Eduard Bloch <blade@debian.org> wrote:
>> I think this is unlikely, since (-s = --scan) is what is used in the
>> Debian aforementioned init script for mdadm (/etc/init.d/mdadm-raid).
>
> That is simply wrong. The mdadm-raid init script uses the mdrun script
> which was written IIRC because of following reasons:
No, that is correct, even in mdadm 1.4.0-1, which I just grabbed from
unstable. Excerpt from /etc/init.d/mdadm-raid:
,----
| AUTOSTART=false
| test -f $DEBIANCONFIG && . $DEBIANCONFIG
|
| case "$1" in
| start)
| if [ -x $MDRUN ] && [ "x$AUTOSTART" = "xtrue" ] ; then
| echo "Starting raid devices: "
| $MDRUN
| echo "done."
| elif [ -f $CONFIG ] ; then
| echo "Starting raid devices: "
| $MDADM -A -s
| echo "done."
| fi
`----
You see, if AUTOSTART was set to anything other than "true" in
$DEBIANCONFIG, then mdrun is *not* run but "mdadm -A -s" is, as I
previously wrote (if $CONFIG is an existing regular file).
Moreover, the default setting for AUTOSTART is "false":
,----[ mdadm-1.4.0/debian/mdadm.templates ]
| Template: mdadm/autostart
| Type: boolean
| Default: false
`----
which means that the default path will *not* invoke mdrun.
> --scan was not reliable under certain circumstance (don't remember the
> details)
It would be interesting to at least report it on linux-raid (perhaps you
did before I subscribed, which happened about 1.5 years ago...), since
Neil Brown seems to take good care of mdadm (in contrast to the
raidtools---some of which, namely raidstart IIRC, are "broken by design"
according to him).
> --scan output needed to be stored somewhere which did not work if / got
> corrupted and cannot be mounted readonly or on initrd before tmpfs or
> such are available
Possible; I don't know about that.
--
Florent
Reply to: