One of the easiest ways to find if your Linux system has any RAID arrays currently in use is to view the contents of the /proc/mdstat file. It’s a file that will definitely be present on your Linux system even if you don’t have any actual RAIDs configured yet.
Empty mdstat configuration
This is how it will look on a system without RAID arrays configured:
/proc/mdstat showing configured RAID arrays
And here’s an example from a system which has a number of arrays configured:
Understanding the /proc/mdstat
First line of the output says Personalities, and this tells you all the possible RAID configurations that your Linux kernel supports:
raid0 – striped volume
multipath – not really a RAID type but instead just support for additional paths (using fiber channel cards) to the same storage.
Next you will have active RAID arrays listed and documented, if there are any.
Here’s how to read a RAID configuration example:
md4 is the name of a RAID array device
RAID type is raid5
array consists of 3 devices (sdb4/sdc4/sda4)
RAID block size is 512K (this is different from your Linux I/O block size, but should be considered and configured together for best performance)
all 3 devices are up (that’s why it says [UUU]). if any of the disks would be missing or faulty, I believe it would show which one by replacing U with _ – so [U_U] would mean the second disk (probably sdc4) is down
That’s it for now! I’ll be posting a full tutorial on creating RAID arrays in Linux soon, so stay tuned! Leave a comment or join my Facebook group to ask questions.