Thread (85 messages) flat view 85 messages, 22 authors, 2005-03-01

Re: Debian Sarge mdadm raid 10 assembling at boot problem

From: Michael Tokarev <hidden>
Date: 2005-01-05 13:41:04

[Please don't start new thread by replying to another message.]

Roger Ellison wrote:
I've been having an enjoyable time tinkering with software raid with
Sarge and the RC2 installer.  The system boots fine with Raid 1 for
/boot and Raid 5 for /.  I decided to experiment with Raid 10 for /opt
since there's nothing there to destroy :).  Using mdadm to create a Raid
0 array from two Raid 1 arrays was simple enough, but getting the Raid
Note there's special raid10 module in recent kernels (and supported by
recent mdadm).  I don't think it's very stable yet, but.. JFYI ;)
10 array activated at boot isn't working well.  I used update-rc.d to
add the symlinks to mdadm-raid using the defaults, but the Raid 10 array
Shouldn't the links be made automatically when installing mdadm?
Also, make sure you're using recent debian package of mdadm --
earlier versions was.. with issues concerning assembling the
arrays (a problem specific to debian mdadm-raid scripts).
Make sure AUTOSTART is set to true in /etc/default/mdadm
(I'm not sure if that's really `AUTOSTART' and `true',
you can look at the file and/or use dpkg-reconfigure mdadm
to set that).
isn't assembled at boot time.  After getting kicked to a root shell, if
I check /proc/mdstat only md1 (/) is started.  After running mdadm-raid
start, md0 (/boot), md2, and md3 start.  If I run mdadm-raid start again
md4 (/opt) starts.  Fsck'ing the newly assembled arrays before
successfully issuing 'mount -a' shows no filesystem errors.  I'm at a
loss and haven't found any similar issue mentions on this list or the
debian-users list.  Here's mdadm.conf:
You have two problems.
First of all, mdadm-raid should be started at very early in the
boot process, and mdadm package post-install scripts ensures this
(you added mdadm-raid links at default order which is 20; but
it should run before filesystem mounts etc, nearly 01 or something).
Ditto for stop scripts -- at the very end, after umounting the
filesystems.  Take a look at /var/lib/dpkg/info/mdadm.postinst --
it sets up the links properly.  When you correct this, your system
will go further in boot process... ;)

And second problem is the order of lines in mdadm.conf.

[edited a bit]
DEVICE partitions
DEVICE /dev/md*
ARRAY /dev/md4 level=raid0 num-devices=2  devices=/dev/md2,/dev/md3
ARRAY /dev/md3 level=raid1 num-devices=2  devices=/dev/sdb5,/dev/sde5
ARRAY /dev/md2 level=raid1 num-devices=2  devices=/dev/sda5,/dev/sdc5
Re-order the lines so that md4 will be listed AFTER all it's
components.  Mdadm tries to assemble them in turn as they're
listed in mdadm.conf. But at the time when it tries to start
md4, it's components aren't here yet so it fails.

HTH.

/mjt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help