Skip to content

Instantly share code, notes, and snippets.

Created Jan 9, 2013
What would you like to do?
MegaRAID CLI Notes


  • Basic Info:

    sudo ./MegaCli64 -CfgDsply -aALL

  • Basic info about the volume(s):

    sudo ./MegaCli64 -LDInfo -Lall -aALL

  • Dumb info about physical drive 0:

    sudo ./MegaCli64 -PhyInfo -phy0 -aALL

  • Info about all physical drives:

    sudo ./MegaCli64 -PDList -aALL

  • Get number of drives on adapter:

    sudo ./MegaCli64 -PDGetNum -aALL

  • See missing drives:

    sudo ./MegaCli64 -PdGetMissing -aALL

  • Enclosure info:

    sudo ./MegaCli64 -EncInfo -aALL

  • View physical drive info in slot 4, when enclosure is "N/A":

    sudo ./MegaCli64 -pdInfo -PhysDrv [:4] -aALL

  • Show rebuild progress in curses-like way for drive in enclosure "N/A", slot 5, adapter 0:

    sudo ./MegaCli64 -PDRbld -ProgDsply -PhysDrv [:5] -a0 sudo ./MegaCli64 -PDRbld -ShowProg -PhysDrv [:5] -a0

    # Use "ShowProg" instead of "ProgDsply" for non-curses output

  • Make drive on slot 6, adapter 0, Unconfigured-Good:

    sudo ./MegaCli64 -PDMakeGood -PhysDrv [:6] -a0

  • Clear a drive:

    sudo ./MegaCli64 -PDClear -Start -PhysDrv [:6] -a0

  • Show drive clear progress:

    sudo ./MegaCli64 -PDClear -ShowProg -PhysDrv [:6] -a0

  • Set drive #5 as global hot spare:

    sudo ./MegaCli64 -PDHSP -Set -PhysDrv [:5] -a0

Walkthrough Change/Replace drive

  • Set drive #7 offline:

    sudo ./MegaCli64 -PdOffline -PhysDrv [:7] -a0

  • Mark drive #7 missing:

    sudo ./MegaCli64 -PdMarkMissing -PhysDrv [:7] -a0

  • Prepare drive #7 for removal:

    sudo ./MegaCli64 -PdPrpRmv -PhysDrv [:7] -a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment