The primary tool in Linux for managing and configuring RAID arrays is mdadm (Multiple Device Administration). Specifically, mdadm “is used for building, managing, and monitoring
Linux md devices (aka RAID arrays)”
On the other hand, we can use /proc/mdstat to monitor the health of RAID arrays.
mdadm
This is used to assemble arrays, add or remove disks, and check RAID status.
Example
To create a RAID 1 array with two disks, we can use the following command:
/dev/md0 is the name of the RAID device that will be created.
To ensure that the new device will be recognized accross reboots we have to add the RAID configuration to the mdadm.conf file; with that, we can then update the initramfs filesystem so that the RAID array is assembled during boot. We can accomplish this with the following: