- 论坛徽章:
- 0
|
针对Dell PE1950(使用megaraid_sas),Dell建议使用LSI提供的MegaCLI工具监控状态。
下载地址:
http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/Linux_MegaCLI_1.01.24.zip
顺便在老外blog上找来一个现成的监控脚本:
http://www.binf.ku.dk/~hanne/blog/?postid=11
----------------------------| check_megaraid.sh |-----------------------------
#!/bin/sh
CONT="a0 a1"
STATUS=0
echo -n "Checking RAID status on "
hostname
for a in $CONT
do
NAME=`/opt/MegaCli -AdpAllInfo -$a |grep "Product Name" | cut -d: -f2`
echo "Controller $a: $NAME"
noonline=`/opt/MegaCli PDList -$a | grep Online | wc -l`
echo "No of Physical disks online : $noonline"
DEGRADED=`/opt/MegaCli -AdpAllInfo -a0 |grep "Degrade"`
echo $DEGRADED
NUM_DEGRADED=`echo $DEGRADED |cut -d" " -f3`
[ "$NUM_DEGRADED" -ne 0 ] && STATUS=1
FAILED=`/opt/MegaCli -AdpAllInfo -a0 |grep "Failed Disks"`
echo $FAILED
NUM_FAILED=`echo $FAILED |cut -d" " -f4`
[ "$NUM_FAILED" -ne 0 ] && STATUS=1
done
exit $STATUS
----------------------------| check_megaraid.sh |-----------------------------
rpm安装MegaCli,然后跑一下脚本:
# ./check_megaraid.sh
Checking RAID status on server_xxx
Controller a0: PERC 5/i Integrated
No of Physical disks online : 2
Degraded : 0
Failed Disks : 0
Controller a1:
No of Physical disks online : 0
Degraded : 0
Failed Disks : 0
至于HP DL360的RAID监控:
1. 下载并安装 mpt-status RPM包:
rpm -ihv http://drugphish.ch/~ratz/mpt-status/RPMS/1.2.0_RC7/mpt-status-1.2.0_RC7-3.i386.rpm
2. 建立字符设备
mknod /dev/mptctl c 10 220
3. 引入mptctl内核模块
modprobe mptctl
4. 查看RAID状态
# mpt-status -i 1
ioc0 vol_id 1 type IM, 2 phy, 67 GB, state OPTIMAL, flags ENABLED
ioc0 phy 1 scsi_id 9 HP DF072A9844 HPD0, 68 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 2 HP DF072A9844 HPD0, 68 GB, state ONLINE, flags NONE
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/456/showart_329804.html |
|