checking state of RAID (for automated notifications)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would like to have RAID status monitored by nagios.

This sounds like a simple script, but I'm not sure what approach is correct.


Considering, that the "health" status of /proc/mdstat looks like this:

# cat /proc/mdstat
Personalities : [raid1] [raid10]
md2 : active raid10 sda2[4] sdd2[3] sdc2[2] sdb2[1]
      779264640 blocks super 1.0 64K chunks 2 near-copies [4/4] [UUUU]

md1 : active raid1 sdd1[1] sdc1[0]
      1076224 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sda1[0]
      1076224 blocks [2/2] [UU]

unused devices: <none>


What my script should be checking?

Does the number of "U" (8 for this host) letters indicate that RAID is healthy?
Or should I count "in_sync" in "cat /sys/block/md*/md/rd*/state"?
Perhaps the two approaches are the same, though.


What's the best way to determine that the RAID is running fine?


--
Tomasz Chmielewski
http://wpkg.org
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux