The eight disks on our laptop backup machine will be put into a raid. But, since I didn’t want to spend a lot of money on a hardware raid card, I’ll be doing in it software.
1. Create partitions on each disk. After do the New – Primary partition, must to t (Change a partition’s system id) to fd (Linux raid autodetect)
2. Use mdadm (Manage MD devices = Linux Software Raid) to create the raid.
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=8 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1
3. Make a filesystem on the raid
mkfs /dev/md0
4. Make it a journaling file system
tune2fs -c0 -i0 -j /dev/md0
5. Mount it
The status of the raid can be checked with:
mdadm --detail /dev/md0
Now just need to write scripts to check the raid and send email if something is wrong.