If you’d like to do some RAID 0/1 in Debian Etch with some SATA drives you can do this in only a few simple steps.
cfdisk all your drives; create your partition(s) and make the type linux-raid-autodetect (Type: FD).
mknod /dev/md0 b 9 0
mdadm –create /dev/md0 –level 0 –raid-devices=2 /dev/sda1 /dev/sdb1
You can do level 1 the same way. Keep in mind that if you do multiple md devices, change the last number to the number of the device (mknod /dev/md1 b 9 1, for example).
For RAID 5, do
mdadm –create /dev/md0 –level 5 –raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdb1
Just keep in mind that RAID 5 needs three or more drives to work.
If you’d like to add more drives to a RAID 5, you can do so easily.
mdadm –add /dev/md0 /dev/sdd1
mdadm –grow /dev/md0 –raid-devices=4
After doing this, you need to resize your filesystem on md0
apt-get install lvm2 lvm-common
You should now be using the full size of the array.
Now all you have to do is