You can setup the array in two ways. You can set it up so you can install your OS on an mdadm array, but it needs to be RAID levels 1 or 10, and you'll need to use metadata version 0.90. Or, you can have a separate OS drive, and set the array up on different disks.
In regards to a hot spare, all you need to do is add the disk to the array, and it will automatically be used as a hot spare in the case of a disk failure.
Code:
mdadm –add /dev/md0 /dev/sdf1
After the spare is added, the device will show up in the /proc/mdstat output with the “(S)” string to indicate that it’s a hot spare.
Testing with a virtual machine is the best and fastest way to gain an understanding of how mdadm works.
Bookmarks