Storage‎ > ‎

MegaCLI

  • Gather information:
    MegaCli -LDInfo -Lall -aALL
    MegaCli -PDList -a0
    MegaCli -CfgDsply -aALL
    MegaCli -AdpGetProp AlarmDsply -aAll
    MegaCli -LDCC -ShowProg -L0 -a0 -Nolog
    MegaCli -FwTermLog -Dsply -a0
  • To Clear Terminal Log
    MegaCli -FwTermLog -Clear -aN
  • Check battery status
    MegaCli -AdpBbuCmd -aAll
  • To find enclosure IDs:
    MegaCli -EncInfo -aN
  • To view a particular physical drive:
    MegaCli -pdinfo -PhysDrv [E:S] -aN
  • To replace a drive:
    MegaCli -PDOffline -PhysDrv [E:S] -aN
    MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
    MegaCli -PDPrpRmv -PhysDrv [E:S] -aN
    ** swap the drive **
    MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
Note: The number N of the array parameter is the Span Reference you get using MegaCli -CfgDsply -aALL and the number N of the row parameter is the Physical Disk in that span which you are replacing, not the slot number. S is the slot number of the NEW disk.

For example: to replace physical disk 0 in span 1 using disk ID 25 you would use the following command.

MegaCli -PdReplaceMissing -PhysDrv [:25] -Array1 -row0 -a0
Warning: Drive rebuilds do not start automatically! You have to actually tell the controller to start rebuilding the drive.
MegaCli -PDRbld -Start -PhysDrv [E:S] -aN

To rebuild a drive that has a "foreign" configuration:

  • Mark the drive as good
MegaCli -PDMakeGood -PhysDrv [E:S]  -aALL
  • Clear the foreign setting
MegaCli -CfgForeign -Clear -a0
  • Set global hot spare - drive should start rebuilding after this
MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
  • Stop consistency check:
    MegaCli -LDCC -Abort -L0 -a0 -Nolog
  • Silence Alarm Beeps
    MegaCli -AdpSetProp -AlarmSilence -aN
  • Show Rebuild Status
    watch -n 30 MegaCli -PDRbld -ShowProg PhysDrv [E:S] -a0

Batteries used for each card type (arcconf getconfig 1 ad OR MegaCli -CfgDsply -aALL | head)

  • Adaptec 5805 -> BBU001
  • LSI MegaRAID SAS 84016E -> LSIBBU001
  • LSI MegaRAID SAS 9260-16i -> iBBU08
Comments