http://www.bxtra.net/articles/2008-09-16/Dell-Perc6i-RAID-Monitoring-Script-using-MegaCli-LSI-CentOS-52-64-bits
I got a Dell Perc6/i Integrated RAID card a few days ago. By using
it with CentOS 5.2 64 bits without GUI, I'm looking the way to monitor
RAID status. I then, found that I can use MegaCLI from LSI to do the
task. (Dell Perc6/i uses LSI Chip)
First, get MegaCLI from LSI website -> MegaCLI 2.00.11 for Linux
Unzip it, and install it by RPM. Files will place at /opt/MegaRAID/MegaCli
. However, since I use 64 bits version, the file I got is MegaCli64
. (32 bits OS will get MegaCli
instead.
I, then, followed what said on this website
(Most information came from that website.)
1. Created a file called "analysis.awk" in the /opt/MegaRAID/MegaCli directory with the following contents:
# This is a little AWK program that interprets MegaCLI output
/Device Id/ { counter += 1; device[counter] = $3 }
/Firmware state/ { state_drive[counter] = $3 }
/Inquiry/ { name_drive[counter] = $3 " " $4 " " $5 " " $6 }
END {
for (i=1; i<=counter; i+=1) printf ( "Device %02d (%s) status is: %s
<br/>\n", device[i], name_drive[i], state_drive[i]); }
2. Tested by run the command : ./MegaCli64 -PDList -aALL | awk -f analysis.awk
[root@xxxxx MegaCli]# ./MegaCli64 -PDList -aALL | awk -f analysis.awk
Device 00 (ATA ST3xxxxxxxx Sxxx 5xxxxx) status is: Online
Device 01 (ATA ST3xxxxxxxx Sxxx 5xxxxx) status is: Online
3. Create a file raidstatus
in /etc/cron.hourly
. Put below script in it :
/opt/MegaRAID/MegaCli/MegaCli64
-PdList -aALL | awk -f /opt/MegaRAID/MegaCli/analysis.awk | grep -qEv
"*: Online" > /dev/null && echo "Warning: RAID status no
longer optimal"
4. Run below command to make the file executable by all users.
chmod a+x /etc/cron.hourly/raidstatus
5. Check where the e-mail notification goes to in CRONTAB. Check this file -> /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
I didn't change anything in CRONTAB. Instead, I changed that in /etc/aliases
file. Specify root : aaa@bbb.com
in there. So, that all mail to root
will go to aaa@bbb.com
There is no e-mail notification if you run cron task (run-parts /etc/cron.hourly
) by yourself. So, you need to wait for CRON to run automatically and you will get an E-mail.
Below are command that maybe useful :
Command to list Adapter Information
:
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll
Command to List all Logical Drives
:
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll
Command to list all Physical Information
:
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll
To check if cron works, run command
:
run-parts /etc/cron.hourly
分享到:
相关推荐
Title : SAS RAID:Dell PERC 5/E Adapter, PERC 5/i Adapter, PERC 5/i Integrated Driver Version : A02 OEM Name : Dell OEM Ver : 1.18.0.32 Computers : 1850, 2850; PowerEdge - 1850, PowerEdge - 1900, 1950...
Dell PERC 5, PERC 6 and CERC 6 RAID Controller Device Driver for Windows Server 2003 x86 This is the driver for following family of PowerEdge Expandable RAID Controller: PERC 5 Controllers PERC 6...
W2k8R2_7JWVC_6.602.12.00_A00_ZPE 适用于PERC H330/H730/H730P/H830控制器的Windows 2008 R2驱动程序 、 W2012_3GRCY_6.602.12.00_A00_ZPE 适用于PERC H330/H730/H730P/H830控制器的Windows 212 驱动程序、 W2012R2...
戴尔dell 2950 raid阵列卡驱动程序是一款适用于戴尔服务器用户的dell 2950 raid卡驱动,这个驱动分为PERC6和非RAID驱动,可以满足部分服务器管理用户的需要,如果想要启用磁盘阵列功能的话就需要安装这个驱动程序了...
PERC6_配置手册(DELL工程师发出
DELL PERC H310_H710RAID配置教程,帮助大家对戴尔服务器PERC卡RAID配置信息的初始化,是指清除PERC上磁盘阵列的配置信息,而不是要清除物理磁盘上保存的用户数据本身,戴尔PowerEdge服务器RAID控制卡的配置,可以...
由于dell pe4600 perc 3/di不支持windows server 2008,因此,在安装的时候,找不到硬盘,须安装windows server 2003的驱动才能发现硬盘
dell服务器安装windows server 2008时所需要的全部驱动程序
DELL_PowerEdge_Servers_PERC5[i&e]_RAID配置中文手册
适用于Perc3/SC/DC/QC Perc4/DC/DI Perc4E/DI/DC 使用新配置(文档中的配置方法仅供参考) 注意:对阵列以及硬盘操作可能会导致数据丢失,请在做任何操作之前, 确认您的数据已经妥善备份!!! New Configuration...
Dell-PERC4系列RAID配置手册.doc
Dell-R230- H330-730-730P-RAID驱动 for Win 2008R2_2012_2012R2 W2k8R2_7JWVC_6.602.12.00_A00_ZPE 适用于PERC H330/H730/H730P/H830控制器的Windows 2008 R2驱动程序 、 W2012_3GRCY_6.602.12.00_A00_ZPE 适用于...
dellperch700驱动是由戴尔推出的一款阵列卡驱动程序,适合h700/h800系列使用,安装后可以有效的制作和启动raid,欢迎有需要的朋友下载使用!驱动包含H700H800阵列卡驱动DELLPERCH700H800raid驱动windowsserver200364...
集成Dell PERC h200 raid驱动制作系统盘
Dell PowerEdge RAID Controller(PERC) H310、H710、H710P 和 H810用户指南.pdf
W2k8R2_7JWVC_6.602.12.00_A00_ZPE 适用于PERC H330/H730/H730P/H830控制器的Windows 2008 R2驱动程序 、 W2012_3GRCY_6.602.12.00_A00_ZPE 适用于PERC H330/H730/H730P/H830控制器的Windows 212 驱动程序、 W2012R2...
对于使用了LSI MegaRAID卡搭建RAID的, 通过LSI公司提供的MegaCli工具, 就可以实现对RAID卡和硬盘的监控. 注: DELL PERC5/6(PowerEdge RAID ControllerPERC)阵列卡实际上也就是LSI MegaRAID SAS controllers.
升级 Dell PERC9 H730 Controller.pdf
DELL服务器的硬盘驱动,6I windows2003
DELL perc H310 驱动 可用于windows 2003 安装