Troubleshooting RAID Problems
If you want to view the status of your RAID array, you can check the contents of the /proc/mdstat file:
$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md_d0 : active raid1 sdb1[0]
976759936 blocks [2/1] [U_]
unused devices: <none>The highlighted part shows that the array is:
- Active
- Running as a "raid1" array
- Currently the only device in the array is /dev/sdb1 and it is operating correctly (active)
Additional output can also be gained by running:
mdadm --detail <RAID Device>
For example:
$ mdadm --detail /dev/md0
/dev/md0:
Version : 00.90
Creation Time : Sat Feb 19 16:29:11 2011
Raid Level : raid1
Array Size : 976759936 (931.51 GiB 1000.20 GB)
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Mon Feb 21 12:42:12 2011
State : clean, degraded
Active Devices : 1
Working Devices: 1
Failed Devices : 1
Spare Devices : 0
UUID : a1500c81:a4bdadeb:382ce4fd:28800507 (local to host homeServer)
Events : 0.72
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 0 0 1 removed
2 8 33 - faulty spare /dev/sdc1The above example shows that member /dev/sdb1 is the currently active device and that it's mirror, /dev/sdc1, has failed (-listed as faulty).