Re: debian testing and mdadm
hi ya adam
On Sat, 26 Mar 2005, Adam Olsen wrote:
> I just recently attempted to use this method:
> http://synic.ath.cx/raid1.txt to create full software raid 1 on our
> server running debian testing. I replaced all the references to
> raidtools with mdadm.
> It seems to be working, cat /proc/mdstat shows:
> Personalities : [raid1]
> md2 : active raid1 sda2 sdb2
> 155308288 blocks [2/2] [UU]
> However, when I reboot, sda2 does not come up - I have to mdadm -a
> /dev/md2 /dev/sda2 to get it to come up. It has to rebuild, which takes
> about an hour.
> My /etc/mdadm/mdadm.conf looks like this:
> DEVICE /dev/sda2,/dev/sdb2
> ARRAY /dev/md2 level=raid1 num-devices=2 devices=/dev/sda1,/dev/sda2
> How can I get /dev/sda2 to come up automatically?
from my 2 second scan of the doc...
raid booting doesn't work automatically because it left out couple of
major details or that i missed it: ( or not emphasized enough in the doc)
i) make sure the partition type is "fd" for all your partitions
ii) set the boot flag on what would be "/"
b) what does your lilo or grub boot files look like ??
i) make sure boot=/dev/md0 AND root=/dev/md0
c) and be sure to test and double test and tripple test it ..
that it can resync its data to brand new replacement disk
and that data from one disk is sync'd to the other one
after it was re-connected and you wrote gazillion 4GB files on
the working disk in degraded mode
now you are really done and it should work magically and automatically
whenever the other disk is disconnected/crashed
and make sure you have a (hot|cold, full|incremental) backup