Re: Initrd and software raid
Bernd Eckenfels <[EMAIL PROTECTED]> wrote: > On Wed, Dec 10, 2003 at 09:48:55AM +0100, Florent Rougon wrote: >> autodetection to manual setting in my GRUB config files and am happy >> with this setup (I hate black magic). > > Black magic can be good for multi path io, sans and generally for a > unattended reboot on hardware changes. Sure, I didn't mean to say black magic is always a bad thing. I have no problem with it when there is a known, documented way to avoid it when unneeded. -- Florent
Re: Initrd and software raid [was: Initrd rocks!]
On Wed, Dec 10, 2003 at 09:48:55AM +0100, Florent Rougon wrote: > autodetection to manual setting in my GRUB config files and am happy > with this setup (I hate black magic). Black magic can be good for multi path io, sans and generally for a unattended reboot on hardware changes. Greetings Bernd -- (OO) -- [EMAIL PROTECTED] -- ( .. ) [EMAIL PROTECTED],linux.de,debian.org} http://home.pages.de/~eckes/ o--o *plush* 2048/93600EFD [EMAIL PROTECTED] +497257930613 BE5-RIPE (OO) When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!
Re: Initrd and software raid
Eduard Bloch <[EMAIL PROTECTED]> 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
Re: Initrd and software raid [was: Initrd rocks!]
#include * Florent Rougon [Wed, Dec 10 2003, 09:48:55AM]: > Note: this starts the root array only; the other arrays are started by a > "mdadm -A -s" from /etc/init.d/mdadm-raid. > > > IIRC, There is a parameter to mdadm (--scan?) that could be used for > > this, but when I asked the initrd maintainer I was given a good reason > > why it was not used (sorry; I can't remember what this was now; it might > > simply be that the mdadm code is unreliable, inefficient, or buggy). > > 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: --scan was not reliable under certain circumstance (don't remember the details) --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 So something was needed to emulate the exact behaviour of the kernel autodetection using a userspace tool, mdrun was born. Herbert did not accept mdrun for initrd-tools but choosed a "manual" mode where all used device files are detected and noted in initrd scripts, then recreated in tmpfs at boot time, using mdadm on them. MfG, Eduard. -- Freude beruht auf dem frohen Glauben, daß das Gute überwiegt.
Re: Initrd and software raid [was: Initrd rocks!]
Brian May <[EMAIL PROTECTED]> wrote: > I believe the kernel raid1 autodetection only works if raid1 is compiled > into the kernel. That is true as explained in: http://marc.theaimsgroup.com/?l=linux-raid&m=105232695713715&w=2 In short, to get autostart with md compiled as modules, you need to apply an md patch from Paul Clements (I never tried this patch). BTW, linux-raid seems not to be archived on mlist.linux.raid any more since about August 2002 which, uhm, sucks. > In anycase, initrd images generated from mkinitrd in Debian do not > autodetect. Also, perhaps it is interesting to note that the md maintainer, Neil Brown, seems to prefer manual settings in boot params instead of autodetection for md arrays. Autodetection was advocated in the SW Raid howto, which is terribly outdated. I for myself switched from autodetection to manual setting in my GRUB config files and am happy with this setup (I hate black magic). Example: kernel /boot/vmlinuz-2.4.18 [your usual kernel cmdline params] root=/dev/md0 ro raid=noautodetect md=0,/dev/hda5,/dev/hdc1 Note: this starts the root array only; the other arrays are started by a "mdadm -A -s" from /etc/init.d/mdadm-raid. > IIRC, There is a parameter to mdadm (--scan?) that could be used for > this, but when I asked the initrd maintainer I was given a good reason > why it was not used (sorry; I can't remember what this was now; it might > simply be that the mdadm code is unreliable, inefficient, or buggy). 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). Also, I use it without any problem since several months now, but my setup is not very exotic. -- Florent