Linux Software RAID

Playing with Linux Software RAID I came across the following error:

mdadm: SET_ARRAY_INFO failed for /dev/md0 Which I found out means that you're trying to assign something to an array that is already in use. Which is what I did. I ripped out the array partitions using fdisk and then tried to recreate the array. You have to tell the kernel to stop using that device as a RAID element. mdadm --stop /dev/md0 Then you're free to create all the new RAID elements that you want. mdadm --create /dev/md0 --level 1 --raid-devices 2 /dev/hda1 /dev/hdb1 mkfs -t ext3 /dev/md0 mount /dev/md0 /mnt/raid1
Later I tore out one partition to (simulate a disk failure) and I wanted to add it back. It's actually pretty easy.

mdadm -a /dev/md0 /dev/hdb1 You can determine the status of your RAID array with two methods. cat /proc/mdstat mdadm --detail /dev/md0
Overall I much prefer the newer mdadm utility to manage RAID elements than the older utilities. Linux software RAID is really quite impressive.

Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
Logged IP:
To prevent spam please submit by clicking the kitten: