#查raid卡信息(生產商、電池信息及所支持的raid級別)
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL |grep -E "Product Name|BBU|Memory Size|RAID Level Supported"
#查看虛擬化(vd)和物理盤(pd)的信息,比如查看物理硬盤數,是否有硬盤offline或者degraded
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL |grep -E "Device Present" -A9
#查看硬盤是否online
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL |grep "Firmware state"
#查看硬盤是否存在物理錯誤(error不爲0,可能會有硬盤故障即將發生)
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL |grep -i error
#查看電池信息(電池類型、電池狀態、充電狀態、溫度等)
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll
#raid卡個數
/opt/MegaRAID/MegaCli/MegaCli64 -adpCount
#顯示所有邏輯磁盤組信息(做了幾組raid,raid cache的默認和當前策略,做好raid後的虛擬盤容量)
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll
#顯示所有物理盤(物理磁盤個數、大小、是否存在error)
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll
#顯示所有物理盤物理錯誤
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll |grep -i error
#查看充電狀態
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |grep 'Charger Status'
#顯示BBU狀態信息,比如電池是否,如果issohgood爲Yes爲正常,No爲異常
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL|grep -i issohgood
#顯示Raid卡型號,cache大小、Raid設置,cache策略、Disk相關信息
opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL |egrep "PDs|VDs|Product Name|Memory|BBU:"
#磁帶狀態的變化,從拔盤,到插盤的過程中。
Device |Normal|Damage|Rebuild|Normal
Virtual Drive |Optimal|Degraded|Degraded|Optimal
Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online
#查看磁盤緩存策略(查看vd的)
/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -aALL
#或者(查看pd的)
#/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -DskCache -LALL -aALL
#緩存策略解釋:
WT (Write through
WB (Write back)
NORA (No read ahead)
RA (Read ahead)
ADRA (Adaptive read ahead)
Cached
Direct
例子:
#查看物理磁盤重建進度
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [1:5] -a0
或者以動態可視化文字界面顯示
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ProgDsply -PhysDrv [1:5] -a0
#磁帶狀態的變化,從拔盤,到插盤的過程中:
Device |Normal|Damage|Rebuild|Normal
Virtual Drive |Optimal|Degraded|Degraded|Optimal
Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online
#RAID Level對應關係:
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 RAID 1
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0 RAID 0
RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3 RAID 5
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0 RAID 10