Check RAID status with mdadm --detail
In this step, you will learn how to check the status of a RAID array using the mdadm
command. mdadm
is a utility used to manage software RAID devices in Linux.
A RAID (Redundant Array of Independent Disks) is a way of storing the same data in different places on multiple hard disks. This can improve performance or provide redundancy, or both.
The mdadm --detail
command provides detailed information about a specific RAID array.
First, let's list the available RAID devices. We can often find them in the /dev/md
directory. Type the following command and press Enter:
ls /dev/md*
You might see output similar to this, indicating a RAID device named md0
:
/dev/md0
Now, let's use mdadm --detail
to inspect the md0
device. Type the following command and press Enter:
sudo mdadm --detail /dev/md0
You will see detailed information about the RAID array, including its status, the devices it uses, and its configuration. The output will look something like this:
/dev/md0:
Version : 1.2
Creation Time : ...
Raid Level : raid1
Array Size : ... (... GiB 1.00 TiB)
Used Dev Size : ... (... GiB 1.00 TiB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : ...
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : ...
UUID : ...
Events : ...
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
Look for the State
line. If it says clean
and Active Devices
matches Raid Devices
, your RAID array is healthy.
This command is essential for monitoring the health and configuration of your software RAID arrays.
Click Continue to proceed to the next step.