# rpm -ivh MegaCli-8.07.14-1.noarch.rpm
# rpm -ql MegaCli
/opt/MegaRAID/MegaCli/MegaCli
/opt/MegaRAID/MegaCli/MegaCli64
/opt/MegaRAID/MegaCli/libstorelibir-2.so.14.07-0
/opt/MegaRAID/MegaCli/MegaCli64 -h
/opt/MegaRAID/MegaCli/MegaCli64 -adpCount
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll // 其中ALL意思是所有的控制器,此处也可以用0表示
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aN // N可以根据Adapter #0来确定
/opt/MegaRAID/MegaCli/MegaCli64 -pdInfo -PhysDrv[E0:S0,E1:S1,...] -aN|-a0,1,2|-aALL
MegaCli64 -PDHSP -set -PhysDrv[E:S] -a0 添加全局热备
MegaCli64 -PDHSP -rmv -PhysDrv[E:S] -a0 删除全局热备
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L2 -force -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[32:5] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL 查raid级别
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL 查raid卡信息
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL | egrep '(RAID|Size)'
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL 查看硬盘信息
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll 查看电池信息
/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL 查看raid卡日志
/opt/MegaRAID/MegaCli/MegaCli64 -adpCount 【显示适配器个数】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpGetTime –aALL 【显示适配器时间】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll 【显示所有适配器信息】
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll 【显示所有的物理信息】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】
/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL 【显示Raid卡型号,Raid设置,Disk相关信息】
# 查看所有相关信息
/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aAll | grep -E "Adapter|Enclosure Device|Slot Number|Target Id|Firmware state"
# 删除 Raid
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -force -a0
# 删除全局热备
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP rmv -PhysDrv[0:9] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP rmv -PhysDrv[0:10] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP rmv -PhysDrv[0:11] -a0
# 创建 Read0 磁盘
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:0] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:1] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:2] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:3] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:4] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:5] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:6] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:7] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:8] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:9] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:10] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:11] WB Direct -a0