Information and logs

Controller information

megacli -AdpAllInfo -aALL

Write lots to a file

megacli -AdpEventLog -GetEvents -f events.log -aALL && cat events.log

Virtual Drives & Drives

Virtual drivers information

megacli -LDInfo -Lall -aALL

List information about all disks

megacli -PDList -aALL

List specific drive information

megacli -PDInfo -PhysDrv [E:S] -aALL

List all background process

megacli -LDInfo -LALL -aALL


Mute the alarm/beeper

megacli -AdpSetProp AlarmSilence -aALL

Turn it off

megacli -AdpSetProp AlarmDsbl -aALL

Turn it on

megacli -AdpSetProp AlarmEnbl -aALL

RAID Building

Creating RAID 10

megacli -CfgSpanAdd -r10 -Array0[E:S,E:S] -Array1[E:S,E:S] -aN
megacli -CfgSpanAdd -r10 -Array0[18:9,18:10] -Array1[18:11,18:12] -a0

Creating RAID 0/1/5

megacli -CfgLdAdd -r(0|1|5) [E:S, E:S, ...] -aN

Disk operationd

Un-plug the disk

megacli -CfgLdDel -Lx -aN

Put disk into offline state

megacli -PDOffline -PhysDrv [E:S] -aN

Put disk into online state

megacli -PDOnline -PhysDrv [E:S] -aN

Mark as missing

megacli -PDMarkMissing -PhysDrv [E:S] -aN

Prepare disk to be removed

megacli -PdPrpRmv -PhysDrv [E:S] -aN

Replace dead drive

megacli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN

Rebuild disk

megacli -PDRbld -Start -PhysDrv [E:S] -aN
megacli -PDRbld -Stop -PhysDrv [E:S] -aN
megacli -PDRbld -ShowProg -PhysDrv [E:S] -aN

Clear disk

megacli -PDClear -Start -PhysDrv [E:S] -aN
megacli -PDClear -Stop -PhysDrv [E:S] -aN
megacli -PDClear -ShowProg -PhysDrv [E:S] -aN

Bad to good

megacli -PDMakeGood -PhysDrv[E:S] -aN

Hot-Spare management

Set global hot spare

megacli -PDHSP -Set -PhysDrv [E:S] -aN

Remove hot spare

megacli -PDHSP -Rmv -PhysDrv [E:S] -aN

Set dedicated hot spare

megacli -PDHSP -Set -Dedicated -ArrayN,M,... -PhysDrv [E:S] -aN