raid卡MegaCli工具使用说明

一、DELL&IBM
MegaCli -AdpAllInfo -aALL —看配置项

#检查raid级别
MegaCli -LDInfo -Lall -aALL | grep 'RAID Level:'
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0

#检查raid缓存容量
MegaCli -cfgdsply -aALL | grep 'Memory:'
Memory: 512MB

#检查Cache策略
MegaCli -LDInfo -Lall -aALL | grep 'Current Cache Policy:'
Current Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU

#检查电池状态
MegaCli -AdpBbuCmd -aAll|grep 'isSOHGood:'
isSOHGood: Yes

MegaCli -AdpBbuCmd -aAll

#检查磁盘状态
MegaCli -PDList -aALL | grep 'Firmware state:'
Firmware state: Online

#检查磁盘是否是SSD

MegaCli -PDList -aALL |grep -i ssd

MegaCli -pdlist -aall | grep rror

MegaCli -fwtermlog dsply -aall —查看raid卡日志

#查看磁盘缓存
MegaCli -LDSetProp -EnDskCache -lall -a0 —开启磁盘缓存

MegaCli -LDSetProp -DisDskCache -lall -a0 —关闭命令

MegaCli -LDinfo -lall -a0 —查看
Default Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Access Policy: Read/Write
Disk Cache Policy: Enabled —开启

Disk Cache Policy: Disabled —关闭

Disk Cache Policy: Disk's Default —默认设置,与厂家有关系,不确定是开启还是关闭

#查看巡读
MegaCli -AdpPR -Info -aALL

Adapter 0: Patrol Read Information:

Patrol Read Mode: Disabled ——被关闭了,默认就是被关闭的,百度的
Patrol Read Execution Delay: 168 hours
Number of iterations completed: 0
Current State: Stopped

Exit Code: 0x00

# 查看是充放电策略

MegaCli -AdpBbuCmd -GetBbuProperties -a0

BBU Properties for Adapter: 0

Auto Learn Period: 2592000 Sec
Next Learn time: 388447520 Sec
Learn Delay Interval:0 Hours
Auto-Learn Mode: Enabled ——开启

查看微码:
# MegaCli -adpallinfo -a0 | head -10

二、HP
#检查raid级别
hpacucli ctrl all show config detail |grep 'Fault Tolerance:'
Fault Tolerance: RAID 1
Fault Tolerance: RAID 1+0

#检查电池、磁盘状态
[root@yf-dba-mld-cal00.yf01.baidu.com ~]# hpacucli ctrl all show config detail |grep 'Status'

Controller Status: OK #raid卡控制器状态
Cache Status: OK #cache状态
Battery Status: OK #电池状态
Status: OK #阵列状态
Status: OK #磁盘状态
Status: OK
Status: OK
Status: OK #阵列状态
Status: OK #磁盘状态
Status: OK
Status: OK
Status: OK
Status: OK
Status: OK
Status: OK

hpacucli ctrl slot=1 show status —查看raid卡信息

#raid卡缓存容量
hpacucli ctrl all show config detail |grep 'Total Cache Size'
Total Cache Size: 512 MB

#raid卡读写策略
hpacucli ctrl all show config detail|grep 'Accelerator Ratio'
Accelerator Ratio: 50% Read / 50% Write

上一篇:【Android】Java堆栈溢出的解决办法


下一篇:由一次线上故障来理解下 TCP 三握、四挥 & Java 堆栈分析到源码的探秘