MegaRAID信息查看
#查raid卡信息(生产商、电池信息及所支持的raid级别) /usr/local/sbin/MegaCl -AdpAllInfo -aALL |grep -E "Product Name|BBU|Memory Size|RAID Level Supported" #查看虚拟化(vd)和物理盘(pd)的信息,比如查看物理硬盘数,是否有硬盘offline或者degraded /usr/local/sbin/MegaCl -AdpAllInfo -aALL |grep -E "Device Present" -A9 #查看硬盘是否online /usr/local/sbin/MegaCl -PDList -aALL |grep "Firmware state" #查看硬盘是否存在物理错误(error不为0,可能会有硬盘故障即将发生) /usr/local/sbin/MegaCl -PDList -aALL |grep -i error #查看电池信息(电池类型、电池状态、充电状态、温度等) /usr/local/sbin/MegaCl -AdpBbuCmd -aAll #raid卡个数 /usr/local/sbin/MegaCl -adpCount #显示所有逻辑磁盘组信息(做了几组raid,raid cache的默认和当前策略,做好raid后的虚拟盘容量) /usr/local/sbin/MegaCl -LDInfo -LALL -aAll #显示所有物理盘(物理磁盘个数、大小、是否存在error) /usr/local/sbin/MegaCl -PDList -aAll #显示所有物理盘物理错误 /usr/local/sbin/MegaCl -PDList -aAll |grep -i error #查看充电状态 /usr/local/sbin/MegaCl -AdpBbuCmd -GetBbuStatus -aALL |grep 'Charger Status' ##查看BBU设置 /usr/local/sbin/MegaCli -AdpBbuCmd -GetBbuProperties -aALL ## 查看当前BBU状态 /usr/local/sbin/MegaCli -AdpBbuCmd -GetBbuStatus -aALL #显示BBU状态信息,比如电池是否,如果issohgood为Yes为正常,No为异常 /usr/local/sbin/MegaCl -AdpBbuCmd -GetBbuStatus -aALL|grep -i issohgood #显示Raid卡型号,cache大小、Raid设置,cache策略、Disk相关信息 /usr/local/sbin/MegaCl -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的) /usr/local/sbin/MegaCl -LDGetProp -Cache -LALL -aALL #或者(查看pd的) #/usr/local/sbin/MegaCl -LDGetProp -DskCache -LALL -aALL #缓存策略解释: WT (Write through WB (Write back) NORA (No read ahead) RA (Read ahead) ADRA (Adaptive read ahead) Cached Direct 例子: #查看物理磁盘重建进度 /usr/local/sbin/MegaCl -PDRbld -ShowProg -PhysDrv [1:5] -a0 或者以动态可视化文字界面显示 /usr/local/sbin/MegaCl -PDRbld -ProgDsply -PhysDrv [1:5] -a0 #磁带状态的变化,从拔盘,到插盘的过程中: Device |Normal|Damage|Rebuild|Normal Virtual Drive |Optimal|Degraded|Degraded|Optimal Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online
HP RAID信息查看
## 查看控制器编号 hpacucli ctrl all show status |egrep 'Smart Array' ## 看出slot=0控制卡的信息 hpacucli ctrl slot=0 show config detail ## 看出slot=0缓存信息 hpacucli ctrl slot=0 show config detail | grep -i 'cache' ## 关闭slot=0上物理磁盘缓存 hpssacli ctrl slot=0 modify drivewritecache=disable ## 开启slot=0上逻辑磁盘缓存 hpssacli ctrl slot=0 logicaldrive 2 modify caching=enable ## 开启slot=0上逻辑磁盘在BBU损坏时缓存 hpssacli ctrl slot=0 modify nobatterywritecache=enable