Storcli

From HPCWIKI
Jump to navigation Jump to search

StorCLI is a command line tool for the administration of MegaRAID Controllers and the successor of MegaCLI.

More background and overall introduction is available this old document

Install storcli under Ubuntu

  1. Download the latest version of storecli from Broadcom URL then unzip the zip file.
  2. Unzip will create folder name storcli_rel and this folder containes Unified_storcli_all_os.zip
  3. Again, unzip Unified_storcli_all_os.zip under the storcli_rel folder then it creates Unified_storcli_all_os folder which contains installable package to support various version of operating system.
  4. For Ubuntu, move to Unbuntu folder under the unzipped folder name Unified_storcli_all_os, e.g, Unified_storcli_all_os/Ubuntu
  5. Install Debian packages. By default, storcli64 executable file will be installed at /opt/MegaRAID/storcli/storcli64
$ sudo dpkg -i storcli_rel/Unified_storcli_all_os/Ubuntu/*.deb   #example to install deb package

# To verify storcli installation
$dpkg -l | grep -i storecli 

# Default storcli command will be installed at By default, storcli64 executable file will be installed at /opt/MegaRAID/storcli/storcli64
  • Administrator can add /opt/MegaRAID/storcli/storcli64 to $PATH or create symbolic link to exist $PATH such as /usr/local/bin
  • HPCMATE storage system has symbolic link at /usr/loca/bin/storcli -> /opt/MegaRAID/storcli/storcli64

Storcli vs Megacli

Although Storcli is successor of MegaCLI, StorCLI command syntax does not compatible with MegaCLI. this Broadcom page describes the difference between MegaCLI and StorCLI

Storcli Commands

Storcli command should be used as root priviliges otherwise command result is not successful without any error message.
$ storcli show      #cli without priviliges
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Status Code = 0
Status = Success
Description = None

Number of Controllers = 0
Host Name = shannon-nas
Operating System  = Linux 5.4.0-153-generic


$ sudo storcli show    ##cli with priviliges
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Status Code = 0
Status = Success
Description = None

Number of Controllers = 1
Host Name = shannon-nas
Operating System  = Linux 5.4.0-153-generic

System Overview :
===============

------------------------------------------------------------------------------------
Ctl Model                   Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS  EHS ASOs Hlth 
------------------------------------------------------------------------------------
  0 AVAGOMegaRAIDSAS9361-8i     8   6   0     0   0     0 N/A On  1&2 Y      3 Opt  
------------------------------------------------------------------------------------

Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed
PDs=Physical drives|DNOpt=Array NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal
Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown
sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Spare Drive
Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit/CV
Hlth=Health|Safe=Safe-mode boot|CertProv-Certificate Provision mode
Chrg=Charging | MsngCbl=Cable Failure

Storcli Commands Summary

Type Description Example
System show system status storcli show

storcli show all

storcli show ctrlcount

storcli show help

storcli -v

Controller show and set controller properties

Syntax : storcli /cx show <property> storcli /cx set <property>=<value> where x is controller number

  • Properties for show
    • storcli /cx show abortcconerror
    • storcli /cx show activityforlocate
    • storcli /cx show alarm
    • storcli /cx show backplane
    • storcli /cx show batterywarning
    • storcli /cx show bgirate
    • storcli /cx show bootwithpinnedcache
    • storcli /cx show cachebypass
    • storcli /cx show cacheflushint
    • storcli /cx show ccrate
    • storcli /cx show clusterenable
    • storcli /cx show coercion
    • storcli /cx show consistencycheck|cc
    • storcli /cx show copyback
    • storcli /cx show directpdmapping
    • storcli /cx show dimmerswitch|ds
    • storcli /cx show eccbucketleakrate
    • storcli /cx show eccbucketsize
    • storcli /cx show enableeghsp
    • storcli /cx show enableesmarter
    • storcli /cx show enableeug
    • storcli /cx show exposeencldevice
    • storcli /cx show jbod
    • storcli /cx show loadbalancemode
    • storcli /cx show maintainpdfailhistory
    • storcli /cx show migraterate
    • storcli /cx show ncq
    • storcli /cx show patrolread|pr
    • storcli /cx show perfmode
    • storcli /cx show pi
    • storcli /cx show preventpiimport
    • storcli /cx show prcorrectunconfiguredareas
    • storcli /cx show prrate
    • storcli /cx show rebuildrate
    • storcli /cx show rehostinfo
    • storcli /cx show restorehotspare
    • storcli /cx show safeid
    • storcli /cx show smartpollinterval
    • storcli /cx show spinupdelay
    • storcli /cx show spinupdrivecount
    • storcli /cx show time
    • storcli /cx show usefdeonlyencrypt
    • storcli /cx show memscrubpatterns
    • storcli /cx show badblocks
    • storcli /cx(x|all) show PI
    • storcli /cx(x|all) show preventpiimport
  • Properties for set
  • storcli /cx set abortcconerror=<on|off> storcli /cx set termlog[=on|off|offthisboot] storcli /cx set activityforlocate=<on|off> storcli /cx set alarm=<on|off|silence> storcli /cx set backplane=<value> storcli /cx set batterywarning=<on|off> storcli /cx set bgirate=<value> storcli /cx set bootwithpinnedcache=<on|off> storcli /cx set cachebypass=<on|off> storcli /cx set cacheflushinterval=<value> storcli /cx set ccrate=<value> storcli /cx set coercion=<value>
Property Name Set Command Range Description
abortcconerror on|off Aborts consistency check when it detects an inconsistency.
activityforlocate on|off Enables/disables drive activity, drive activity locates function for systems without SGPIO/SES capabilities.
alarm on|off|silence

silence: Silences the alarm

Enables/disables alarm on critical errors
backplane 0: Use autodetect logic of backplanes,

such as SGPIO and I2C SEP using GPIO

pins.

1: Disable autodetect SGPIO.

2: Disable I2C SEP autodetect.

3: Disable both the autodetects.

Configures enclosure detection on a non-SES/expander

backplane.

batterywarning on|off Enables/disables battery warnings
bgirate 0 to 100 Sets background initialization rate in percentage.
cacheflushint 0 to 255, default value 4 Sets cache flush interval in seconds
ccrate 0 to 100 Sets consistency check rate in percentage
coercion 0: No coercion

1: 128 MB

2: 1 GB

Sets drive capacity in coercion mode
consistencycheck See Consistency Check. See Consistency Check.
copyback on|off

type = smartssd|smarthdd|all

smartssd: Copy back enabled for SSD

drives.

smarthdd: Copy back enabled for HDD

drives.

all: Copy back enabled for both ssd

drives and HDD drives.

Example:

storcli /cx set copyback=on

type=all

Enables/disables copy back for drive types.
directpdmapping on|off Enables/disables direct physical drive mapping. When

enclosures are used, this feature is disabled; otherwise it

should be enabled.

eccbucketleakrate 0 to 65535 Sets leak rate of the single-bit bucket in minutes (one

entry removed per leak-rate).

eccbucketsize 0 to 255 Sets size of ECC single-bit-error bucket (logs event

when full).

enableeghsp on|off Enables/disables the commissioning of otherwise

incompatible global hot spare drives as Emergency Hot

Spare (EHSP) drives

enableesmarter on|off Enables/disables the commissioning of Emergency Hot

Spare (EHSP) drives for Predictive Failure (PFA) events.

enableeug on|off Enables/disables the commissioning of Unconfigured

Good drives as Emergency Hot Spare (EHSP) drives

exposeencldevice on|off Enables/disables device drivers to expose enclosure

devices; for example, expanders, SEPs

dimmerswitch|ds See Dimmer Switch

Commands.

See Dimmer Switch

Commands.

foreignautoimport on|off Imports foreign configuration automatically, at boot.
jbod on|off Enables/disables JBOD mode; by default, drives become

system drives.

NOTE Not supported by all controllers

loadbalancemode on|off Enables/disables automatic load balancing between SAS

phys or ports in a wide port configuration

TBD

References