Share your love
Quickly and Efficiently Check RAID Configuration on Linux
In this article, we want to teach you How To Check RAID Configuration on Linux.
RAID (redundant array of independent disks) is a way of storing the same data in different places on multiple hard disks or solid-state drives (SSDs) to protect data in the case of a drive failure.
RAID systems can be used with a number of interfaces, including SATA, SCSI, IDE, or FC (fiber channel.) There are systems that use SATA disks internally, but that have a FireWire or SCSI for the host system.
There are different RAID levels, however, and not all have the goal of providing redundancy.
Linux supports the following RAID devices:
- RAID0 (striping)
- RAID1 (mirroring)
- RAID4
- RAID5
- RAID6
- RAID10
- MULTIPATH
- FAULTY
- CONTAINER
Steps to Check RAID Configuration on Linux
At this point, we want to show you how to use Linux commands to Check RAID Configuration on Linux.
Linux Raid Status
A directory named /proc/mdstat
stores essential information about all active RAID devices.
List Raid devices in Linux
Use the cat command to see the file:
cat /proc/mdstat
Or you can use the following command:
cat /etc/mdadm.conf
The mdadm is a Linux utility used to manage and monitor software RAID devices.
Monitor Raid devices in Linux
It is used in modern Linux distributions in place of older software RAID utilities such as raidtools2 or raid tools.
The main purpose of mdadm command is to combine one or more physical disk drive components into one or more logical units.
mdadm command can be used in the below way:
mdadm [mode] <raiddevice> [options] <component-devices>
To find out whether a specific device is a RAID device or a component device, you can use the mdadm command, for example:
# mdadm --query /dev/DEVICE
# mdadm --query /dev/md125
# mdadm --query /dev/md12{5,6,7}
Output
/dev/md125: 1157.85GiB raid10 5 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md126: 4.98GiB raid10 5 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md127: 1281.00MiB raid10 5 devices, 0 spares. Use mdadm --detail for more detail.
You can examine a RAID device in more detail, with the following command, for example:
mdadm --examine /dev/sdd3
Output
/dev/sdd3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x1
Array UUID : 4afdd8e1:a827d278:b1613938:cdc0a6ef
Name : localhost.localdomain:root
Creation Time : Sun Jun 25 19:07:43 2017
Raid Level : raid10
Raid Devices : 5
Avail Dev Size : 971276288 (463.14 GiB 497.29 GB)
Array Size : 1214095360 (1157.85 GiB 1243.23 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262056 sectors, after=0 sectors
State : clean
Device UUID : b6d9043e:fc1c8b6e:e82f970f:edf597e9
Internal Bitmap : 8 sectors from superblock
Update Time : Sat Dec 15 00:44:25 2018
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 7c314cad - correct
Events : 21001
Layout : near=2
Chunk Size : 512K
Device Role : Active device 4
Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
Conclusion
At this point, you learn to Check RAID configuration on Linux. Hope you enjoy it.
May you will be interested in these articles: