免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1446 | 回复: 0
打印 上一主题 下一主题

Dell PE1950/HP DL360磁盘RAID状态监控 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-27 20:31 |只看该作者 |倒序浏览

针对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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP