Monitoring RAID Devices
The following
commands are useful for monitoring
RAID devices:
·
cat /proc/mdstat: Shows the status of the RAID devices and the status of any
actions being performed on them such as adding a new member or rebuilding the array.
·
mdadm --query /dev/mdX: Displays basic data about the device such as size and number of spares such as:
/dev/md0: 9.77GiB
raid1 3 devices,
1 spare.
Add the --detail option to display more data ( mdadm --query –detail /dev/mdX):
/dev/md0:
Version : 00.90.03
Creation Time : Mon Dec 18 07:39:05 2011
Raid Level : raid1
Array Size :
10241280 (9.77 GiB 10.49 GB)
Device Size : 10241280
(9.77 GiB 10.49 GB)
Raid Devices
: 3
Total Devices
: 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Mon Dec 18 07:40:01 2006
State : clean, degraded,
recovering
Active Devices
: 2
Working Devices : 3
Failed Devices
: 1
Spare
Devices : 1
Rebuild Status : 49% complete
UUID : be623775:3e4ed7d6:c133873d:fbd771aa
Events : 0.5
Number Major Minor
RaidDevice State
3 8 8 0 spare rebuilding /dev/sda8
1 8 6 1 active
sync /dev/sda6
2 8 7 2 active
sync /dev/sda7
4 8 5 - faulty
spare /dev/sda5
mdadm --examine <partition>: Displays detailed
data about a component of a RAID array
such as RAID level, total number of devices, number of working devices, and number
of failed devices. For example,
the output of mdadm --examine /dev/sda6 shows the following:
/dev/sda6:
Magic
: a92b4efc
Version : 00.90.00
UUID : be623775:3e4ed7d6:c133873d:fbd771aa
Creation Time : Mon Dec 18 07:39:05 2011
Raid Level : raid1
Device Size : 10241280
(9.77 GiB 10.49 GB)
Array Size : 10241280 (9.77 GiB 10.49 GB)
Raid Devices
: 3
Total Devices
: 4
Preferred Minor : 0
Update Time : Mon Dec 18 07:40:01 2011
State : active
Active Devices
: 2
Working Devices : 3
Failed Devices : 0
Spare Devices
: 1
Checksum : ee90b526 - correct
Events : 0.5
0 comments:
Post a Comment