StorCLI Common Commands

StorCLI Common Commands

Information for general use:

  • /cx bzw. /vx stands for the Controller/Virtual Drive Number.
  • /ex bzw. /sx stands for the Enclosure/Slot ID.

Firmware Update

sudo storcli /cx download file=/path/to/firmware.rom

Information on the Controller and Configuration

sudo storcli /cx show all

Activation of Features (e.g. CacheCade, FastPath,...)

 sudo storcli /cx set aso key=AAAAAAAABBBBBBBBCCCCCCCC

Information on the existing hard drives and their status (IDs,...)

sudo storcli /cx /eall /sall show (all)

Information on the existing virtual drives and their status

sudo storcli /cx /vall show (all)

View current status of all rebuilds

sudo storcli /cx /eall /sall show rebuild

Creating a Virtual Drive

sudo storcli /cx add vd type=[RAID0(r0)|RAID1(r1)|...] drives=[EnclosureID:SlotID|:SlotID-SlotID|:SlotID,SlotID]

Example:

sudo storcli /cx add vd type=r1 drives=252:0-2

Initializing a VD

sudo storcli /cx/vx start init (force)

Progress can be monitored using the following command:

sudo storcli /cx/vx show init

Creating a CacheCade device

sudo storcli /cx add vd cc type=r[0,1,10] drives=[EnclosureID:SlotID|:SlotID-SlotID|:SlotID,SlotID]  WT|WB (assignvds=0,1,2)

Example:

sudo storcli /c0 add vd cc type=r1 drives=252:2-3 WB

CacheCade activation/deactivation

sudo storcli /cx/[vx|vall] set ssdCaching=[on|off]

Example:

sudo storcli /c0/v1 set ssdCaching=on

Removing a CacheCade device

sudo storcli /cx/vx del cc

Removing a VD

sudo storcli /cx/vx del (force)

Incorporating an improperly removed device

If an improperly removed device is reconnected to the RAID controller it will be recognized as UBAD (Unconfigured Bad).

sudo storcli /c0 /eall /sall show
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
 
 
Drive Information :
=================
 
-------------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model                  Sp 
-------------------------------------------------------------------------------
252:0     7 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
252:1     6 Onln   1  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
252:2     5 UGood  -  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
252:3     4 UBad   - 223.062 GB SATA SSD N   N  512B INTEL SSDSC2CW240A3    U  
-------------------------------------------------------------------------------
 
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign
UGUnsp-Unsupported

This status must be changed to UGOOD.

sudo storcli /cx /ex /sx set good
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
 
 
Drive Information :
=================
 
-------------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model                  Sp 
-------------------------------------------------------------------------------
252:0     7 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
252:1     6 Onln   1  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
252:2     5 UGood  -  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
252:3     4 UGood  F 223.062 GB SATA SSD N   N  512B INTEL SSDSC2CW240A3    U  
-------------------------------------------------------------------------------
 
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign
UGUnsp-Unsupported

Now the device is foreign in the pool

sudo storcli /cx /fall show
Controller = 0
Status = Success
Description = Operation on foreign configuration Succeeded
 
 
FOREIGN CONFIGURATION :
=====================
 
----------------------------------------
DG EID:Slot Type State       Size NoVDs 
----------------------------------------
 0 -        Cac0 Frgn  223.062 GB     1 
----------------------------------------
 
NoVDs - Number of VDs in disk group|DG - Diskgroup
Total foreign drive groups = 1

Now it can be included in the configuration.

sudo storcli /cx /fall import

If the device was part of a RAID a rebuild is performed automatically (see the state: Rbld in the overview). The following command progress can be monitored:

sudo storcli /cx /ex /sx show rebuild

 

    • Related Articles

    • Storcli for FreeBSD and Other Operating Systems

      UPDATE (4/28/17): Broadcom acquired Avago since the time of the original publication of this article. To access Storcli and other "LSI" utilities, use the following link and select your product: https://www.broadcom.com/support/download-search ...
    • Management Utilities Overview (LSI)

      If you are new to LSI MegaRAID and LSI SAS HBA controllers, this guide will provide a general overview of applicable management utilities and firmware flash utilities, and recommended usage scenarios for these tools. LSI MegaRAID Management ...
    • MegaCli Common Commands

      General Parameters   Adapter parameter -aN   The parameter -aN (where N is a number starting with zero or the string ALL) specifies the adapter ID. If you have only one controller it’s safe to use ALL instead of a specific ID, but you’re encouraged ...
    • BBU Commands for Storcli

      *****Recent Versions of Storcli now use the /cv command**** storcli /cx /cv Example.. storcli /c0 /cv BBU Commands The Storage Command Line Tool supports the following battery backup unit (BBU) commands: storcli /cx/bbu show storcli /cx/bbu show all ...
    • LSI controller model and serial

      Q: How do I determine my RAID controller model and serial number? A: For LSI MegaRAID series controllers, this information can be obtained using any of LSI's MegaRAID management utilities. If using a LSI SAS HBA, you can use the utilities sas2flash ...