mdadm RAID Tutorial
Here is how you make a software RAID (switch to root)
I am currently writing a python script which will automate all these steps by taking in a few parameters from the user. This is work in progress and will be available on my github repository. In the meantime you can use this tutorial as a reference.
- List all the attached disks:
- Create a full disk partition on each disk:
- Get mdadm if not already installed
- Build the Array using mdadm ( -C Create -v Verbose -l RAID Level -n Number of disks) In the example below we are deploying a level 5 RAID using three disks at /dev/md0
- Make the file system
- Add the array in the madadm.conf file
A line like this will be appended ( ARRAY /dev/md/synapse1:0 metadata=1.2 name=synapse1:0 UUID=04d1879f:4dfc2e39:b25601e0:52b1cf6 )
- Create the mount point
- Add the mount point in the fstab file
Add this line ( /dev/md0 /data ext4 noatime,rw 0 0 )
- Restart the system and check if the RAID auto-mounts at /data
OR