Useful LSI MegaCli64 Commands

Ivan Lawrence -

Using the MegaCli64 utility you can find a lot of info about the RAID adapters and disks.  

LSI replaced MegaCli with StorCLI / StorCLI64 and some command syntax has changed.  See the storcli article in this help center. 
http://support.dvsus.com/hc/en-us/articles/115000636106-LSI-storcli64-examples

Embedded MegaRAID Software User Guide:
www.dvsus.com/gold/san/LSI/48712-00B_EmbMRAID_SWUG.pdf

Login as root user

Silence Alarm:

/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp AlarmSilence -aAll

List showing drive states (include a failed) example:

/opt/MegaRAID/MegaCli/MegaCli64 -LDPDInfo -aAll | grep -i 'inquiry\|firmware state'

NOTE: This will output two lines for each disk; "status" followed by the disk serial, model, and firmware info. 

Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB31UWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3A5WHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3LLWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3DVWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB33ZWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB5N3WHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB39MWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGAZ0PWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2331PAG5AT2THitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Failed
Inquiry Data:       PK2331PAG52RYTHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3NBWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB5NEWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2331PAG5ASATHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2331PAG5BD7THitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGA892WHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3NYWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:            32NFP14ZTTOSHIBA MK5061GSYB                      ME0A    
Firmware state: Online, Spun Up
Inquiry Data:            32NFP14DTTOSHIBA MK5061GSYB                      ME0A    
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB5SYWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB338WHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3L6WHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGAHDNWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGA8ADWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB3LVWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGB312WHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data:       PK2361PAGA89NWHitachi HUS724040ALE640                 MJAOA3B0
Firmware state: Online, Spun Up
Inquiry Data: CVCV251505C9240CGN  INTEL SSDSC2CW240A3                     400i    
Firmware state: Online, Spun Up
Inquiry Data: CVCV2515021D240CGN  INTEL SSDSC2CW240A3                     400i    

Drive location and state:

Use this to identify the "Enclosure Device ID" and "Slot Number" to be used in other commands.

/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall | grep -i 'adapter\|enclosure device id\|slot number\|error count\|predictive\|firmware state\|inquiry data'
Adapter #0
Enclosure Device ID: 245
Slot Number: 4
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
Firmware state: Unconfigured(good), Spun down
Inquiry Data: SEAGATE ST9600205SS     00026XR25AZ3            
Enclosure Device ID: 245
Slot Number: 5
Media Error Count: 31
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
Firmware state: Online, Spun Up
Inquiry Data: SEAGATE ST9600205SS     00026XR24NHW            
Enclosure Device ID: 245

Start a rebuild:

This example uses 245 as "Enclosure Device ID", 4 as "Slot Number" and -a0 for adapter 0, use the appropriate values for your needs.

/opt/MegaRAID/MegaCli/MegaCli64 -pdrbld -start -physdrv [245:4] -a0
Started rebuild progress on device(Encl-245 Slot-4)

Show rebuild progress:

This example uses 245 as "Enclosure Device ID" and 4 as "Slot Number", use the appropriate values for your needs.

/opt/MegaRAID/MegaCli/MegaCli64 -pdrbld -showprog -physdrv [245:4] -aall
Rebuild Progress on Device at Enclosure 245, Slot 4 Completed 3% in 6 Minutes.

Auto Rebuild:

Show the mode setting for auto rebuild

/opt/MegaRAID/MegaCli/MegaCli64 -adpautorbld -dsply -aall

Enable the auto rebuild mode

/opt/MegaRAID/MegaCli/MegaCli64 -adpautorbld -dsply -aall

General RAID card information:

opt/MegaRAID/MegaCli/MegaCli64 AdpAllInfo -aAll

Logical Disks and Physical Disks:

/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll

Catch all commands:

/opt/MegaRAID/MegaCli/MegaCli64 -ShowSummary -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -EncInfo -aAll

Current Events:

/opt/MegaRAID/MegaCli/MegaCli64 -AdpEventLog -GetEventLogInfo -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -AdpEventLog -GetEvents

Battery (BBU):

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -a2
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -a2

 

External resource:

http://www.alexlinux.com/megacli-show-rebuild-status/

 

 

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.