首页 » 系统相关 » How to use the MegaCLI Utility with your RAID Controller on your DELL PowerEdge Server in Linux. (在linux监控RAID信息)

How to use the MegaCLI Utility with your RAID Controller on your DELL PowerEdge Server in Linux. (在linux监控RAID信息)

How to use the MegaCLI Utility with your RAID Controller on your DELL PowerEdge Server in Linux

The MegaRAID Storage Manager includes both GUI (MSM) and The megacli tool is used for managing the controller via the command-line interface, text based tools (MegaCLI) to monitor and manage the disk array.

Installation of the MegaCLI RPM

1, Ensure you are logged in as ‘root’
2, Download MegaCLI to your server :
# mkdir /root/megacli
# cd /root/megacli

–To get the following 2 rpm files. http://yunpan.cn/QiqvBnrdkuQEk 访问密码 7d2d

# upload MegaCli-8.02.16-1.i386.rpm and Lib_Utils-1.00-09.noarch.rpm
# rpm -Uvh MegaCli*.rpm
# rpm -Uvh Lib_Utils*.rpm

A. Running MegaRAID Storage Manager (MSM)

MSM is a GUI Java application.To launch MSM, execute the following command:
$ /usr/local/MegaRAID\ Storage\ Manager/startupui.sh
The username is root and the password is the root password for the system. After logging in enter the
IP address of the system you wish to manage and click on the Update button. Select the server from the
resulting list and click on the Connect button.
To access detailed documentation select Help from the MSM menu.

B. Running MegaCLI

To run the MegaRAID CLI, execute the following command:
32-bit
/opt/MegaRAID/MegaCli/MegaCli

64-bit
/opt/MegaRAID/MegaCli/MegaCli64

Example Usage:

Display logical devices

# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aALL

Adapter 0 — Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0
Size : 272.25 GB
Mirror Data : 272.25 GB
State : Optimal
Strip Size : 64 KB
Number Of Drives per span:2
Span Depth : 2
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk’s Default
Encryption Type : None
Is VD Cached: No

Display Physical Devices

# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL

Check disk health

# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL|egrep "Slot Number|S.M.A.R.T"
Slot Number: 0Slot Number: 0
Drive has flagged a S.M.A.R.T alert : No
Slot Number: 1
Drive has flagged a S.M.A.R.T alert : No
Slot Number: 2
Drive has flagged a S.M.A.R.T alert : Yes
Slot Number: 3
Drive has flagged a S.M.A.R.T alert : No
Slot Number: 4
Drive has flagged a S.M.A.R.T alert : No
Slot Number: 5
Drive has flagged a S.M.A.R.T alert : No

NOTE:
Slot Number: 2 Disk corruption.
The corruption disk other info:
Predictive Failure Count: 1
Last Predictive Failure Event Seq Number: 9862

When replace new disk “Firmware state” value is “Unconfigured(good), Spun Up”, Wait a moment begin to reconfigure RAID changed to “Rebuild” ,Default “Firmware state” value is “Online, Spun Up”.

Show Rebuild Progress

# /opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -physdrv[32:2] -aALL

Rebuild Progress on Device at Enclosure 252, Slot 3 Completed 55% in 22 Minutes.

Display detailed Adapter and Device information

# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAlILog -aALL

Display battery information

# /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aALL

Display in depth controller information :

# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL

Display virtual disk information :

# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL

Display physical disk information :

# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL

Generate a controller log

# /opt/MegaRAID/MegaCli/MegaCli64 -AdpEventLog -GetEvents -f controller_log.txt -aALL

For ibm http://www-947.ibm.com/support/entry/portal/docdisplay?lndocid=migr-5082327
For More COMMAND http://zh.community.dell.com/techcenter/b/weblog/archive/2013/03/07/megacli-command-share.aspx

References http://www.dell.com/support/troubleshooting/an/en/andhs1/KCS/KcsArticles/ArticleView?c=an&l=en&s=dhs&docid=623352

打赏

对不起,这篇文章暂时关闭评论。