Storcli
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
- Download the latest version of storecli from Broadcom URL then unzip the zip file.
- Unzip will create folder name storcli_rel and this folder containes Unified_storcli_all_os.zip
- 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.
- For Ubuntu, move to Unbuntu folder under the unzipped folder name Unified_storcli_all_os, e.g, Unified_storcli_all_os/Ubuntu
- 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 Commands | show system status | storcli show
storcli show all storcli show ctrlcount storcli show help storcli -v |
Controller Commands | show and set controller properties
Syntax : storcli /cx show <property>
storcli /cx set <property>=<value>
where x is controller number |
|
Drive Commands | information and perform actions related to physical drives
storcli /cx[/ex]/sx show storcli /cx[/ex]/sx set properties where,
|
Sets physical drive properties
Shows virtual drive information
|
Virtual Drives Commands | Creates/Delete/Set/Show virtual drives | |
Foreign Configurations Commands | ||
BIOS-Related Commands | ||
Drive Group Commands | ||
Dimmer Switch Commands | Dimmer Switch is the power-saving policy for the virtual drive | |
BBU Commands | ||
Enclosure Commands | ||
PHY Commands | ||
Logging Commands | generate and maintain log files |
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 | Todo Dimmer Switch Commands. | Todo 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 |
maintainpdfailhistory | on|off | Maintains the physical drive fail history |
migraterate | 0 to 100 | Sets data migration rate in percentage |
patrolread|pr | Todo Patrol Read | Todo Patrol Read |
perfmode | 0: Tuned to provide best IOPS, currently
applicable to non-FastPath 1: Tuned to provide least latency, currently applicable to non-FastPath |
Performance tuning setting for the controller |
pi | on|off | Enables/disables data protection on the controller |
preventpiimport | on|off | Enables/disables import data protection drives on the controller |
prcorrectunconfiguredareas | on|off | Correct media errors during PR by writing 0s to unconfigured areas of the disk |
prrate | 0 to 100 | Sets patrol read rate of the virtual drives in percentage |
rebuildrate | 0 to 100 | Sets rebuild rate of the drive in percentage |
reconrate | 0 to 100 | Sets reconstruction rate for a drive in percentage |
restorehotspare | on|off | Becomes a hot spare on insertion of a failed drive. |
smartpollinterval | 0 to 65535 | Set time for polling of SMART errors in seconds |
spinupdrivecount | 0 to 255 | Sets number of drives that are spun up at a time |
spinupdelay | 0 to 255 | Sets spin-up delay between a group of drives or a set of drives, in seconds |
stoponerror | on|off | Stops the MegaRAID BIOS during POST, if any errors are
encountered |
time | Valid time in yymmdd hh:mm:ss format or systemtime | Sets the controller time to your input value or the system
time (local time in 24-hour format) |
usefdeonlyencrypt | on|off | Enables/disables FDE drive-based encryption |