Officially known as Multiple Disk and Device Management, mdadm is a Linux utility that is used in the creation, management, and monitoring of software-based RAID devices. In modern Linux distros, it's a command line tool that serves as a replacement for outdated utilities like raidtools and raidtools2.
But how exactly is mdadm used to configure RAID, and how can it make your life easier?
Creating a RAID Array with mdadm
The process of creating a RAID array is one of mdadm's most basic features. Start by entering the following command:
Note that the command string above contains some custom parameters. These include:
Assembling and Starting a RAID Array with mdadm
This is another basic feature of mdadm. To force a RAID assembly and startup, use the command:
Note that this command will work even a member of the RAID array is missing. If you want to check the status of your assembled RAID arrays, use the command:
Stopping and Deleted a RAID Array with mdadm You can also use mdadm to stop or delete a RAID array. To stop a current RAID array, use the command:
If you want to delete a previously created RAID array, use the command:
Benefits of mdadm RAID Now that you have a better idea of how to use mdadm to configure and manage RAID arrays, it's time to identify some of the biggest benefits and advantages of mdadm. These include:
While hardware-based RAID will still be the more reliable option, software-based RAID via mdadm is becoming an increasingly popular choice amongst Linux users.