Hello,
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[1] sdb2[0]
155308288 blocks [2/2] [UU]
unused devices: <none>
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?
Adam
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
mdadm problems
easy way to write mdadm.conf file
I noticed this old thread. Hopefully it might help someone anyway.
To write out an mdadm.conf format for an existing raid array,
use --detail --brief flags from mdadm.
e.g.
Other than this, I'd suggest checking that the init script to bring up the raid is working OK.
Check the dmesg for any diagnostic. If the SCSI device driver is a module, try making it built
into the kernel. Also make the raid support as part of the kernel, not module.
To write out an mdadm.conf format for an existing raid array,
use --detail --brief flags from mdadm.
e.g.
Code: Select all
# /sbin/mdadm --detail --brief /dev/md0 /dev/md1 /dev/md2
ARRAY /dev/md0 level=raid1 num-devices=2 spares=1 UUID=134c8623:cff3ca51:e96bf5a4:0e3e72a9 devices=/dev/ide/host2/bus0/target0/lun0/part1,/dev/ide/host0/bus1/target0/lun0/part1,/dev/ide/host2/bus1/target0/lun0/part1
ARRAY /dev/md1 level=raid5 num-devices=3 spares=1 UUID=c073d8bd:02215d9e:48e358d0:2fb24420 devices=/dev/ide/host2/bus0/target0/lun0/part5,/dev/ide/host0/bus1/target0/lun0/part5,/dev/ide/host2/bus1/target0/lun0/part5,/dev/ide/host0/bus0/target0/lun0/part5
ARRAY /dev/md2 level=raid5 num-devices=3 spares=1 UUID=74d1bf46:741a7d77:dcb83bd9:74dce41f
devices=/dev/ide/host2/bus0/target0/lun0/part6,/dev/ide/host0/bus1/target0/lun0/part6,/dev/ide/host2/bus1/target0/lun0/part6,/dev/ide/host0/bus0/target0/lun0/part6
Check the dmesg for any diagnostic. If the SCSI device driver is a module, try making it built
into the kernel. Also make the raid support as part of the kernel, not module.
actually...
If this is accurate:
The problem is that you have the config wrong.
I think you meant:
Code: Select all
DEVICE /dev/sda2,/dev/sdb2
ARRAY /dev/md2 level=raid1 num-devices=2 devices=/dev/sda1,/dev/sda2
I think you meant:
Code: Select all
DEVICE /dev/sda2,/dev/sdb2
ARRAY /dev/md2 level=raid1 num-devices=2 devices=/dev/sda1,/dev/sdb2