Table of Contents

,

megacli commands

Info

megacli -LDInfo -Lall -aAll
megacli -AdpAllInfo -aALL
megacli -PDList -aALL

Check disk for predictive error count

megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state|Device Id:"

Rebuild drive

megacli -PDRbld -ShowProg -PhysDrv[252:1] -a0

Check battery (BBU)

megacli -AdpBbuCmd -aALL

Delete virtual drive 1

megacli -CfgLdDel -L1 -a0

No writeback cache

megacli -LDSetProp -NoCachedBadBBU -Immediate -Lall -aAll

ROM flash

megacli -adpfwflash -f imr_fw.rom -a0

Create raid 1

megacli -CfgLdAdd -r1 [32:0,32:1] WB NORA Direct NoCachedBadBBU -strpsz64 -a0

Create raid 10

megacli -CfgSpanAdd -R10 -Array0 [252:4,252:5] -Array1 [252:6,252:7] WB NORA Direct -strpsz64 -a0

raid 1 from 4 disks

megacli -CfgLdAdd -r1 [32:2,32:3] WB RA Direct CachedBadBBU -a0

In square brackets are Enclosure Id:Slot Id. Check those with

megaCli -PDList -aALL

Tested on

See also

References