RAID管理工具 -- MegaCli常用命令

版权声明:本文为博主原创文章,未经博主允许最好别转载,你非要转我也没办法。 ╮(╯▽╰)╭ https://blog.csdn.net/u011478909/article/details/53332037

#查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

展开阅读全文

没有更多推荐了,返回首页