Storcli
StorCLI is a command line tool for the administration of MegaRAID Controllers and the successor of MegaCLI.
HBA/RAID controller and Hardware RAID information on Linux provides high level summary for HBA and RAID controller.
Detailed background and overall introduction is available this old document and user reference manual is available at this Broadcom site[1]
Install storcli on 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 /opt/MegaRAID/storcli folder,
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
Creating and Deleting a RAID
Create Virtual Drives
Storcli /cx add vd type=raid[0|1|5|6|10|50|60][Size=<VD1_Sz>,<VD2_Sz>,..|*all] [name=<VDNAME1>,..] drives=e:s|e:s-x|e:s-x,y [PDperArray=x|auto*] [SED] [pdcache=on|off|*default][pi] [DimmerSwitch(ds)=default|automatic(auto)| *none|maximum(max)|MaximumWithoutCaching(maxnocache)] [wt|*wb] [nora|*ra] [*direct|cached] [CachedBadBBU|*NoCachedBadBBU]
[strip=<8|16|32|64|128|256|512|1024] [AfterVd=x] [Spares=[e:]s|[e:]s-x|[e:]s-x,y] [force]
** PDperArray - Set this parameter only when you create a RAID 10, RAID 50, or RAID 60 group.** LSI recommend to use sequential access patterns in the range of 64 KB to 1 MB. Use random access patterns in the range of 0.5 KB to 8 KB [2]
Deleting Virtual Drives
The following command deletes virtual drives:
storcli /cx/v(x|all) del [cc|cachecade]. (The cc or cachecade option to confirm that the deleted drive is a CacheCade drive)
Setting the disk cache policy in a Virtual Drive
To set the current disk cache policy on a virtual drive to on, off, or default setting.
storcli /cx/vx set pdcache=<on|off|default>
Example) storcli /c0/v0 set pdcache=on
** LSI recommends Direct I/O for all RAID level configurations.[3]
Setting the read cache policy in a Virtual Drive
To set the read cache policy on a virtual drive to read ahead, no read ahead, or adaptive read ahead.
storcli /cx/vx set rdcache=<ra|nora>
Example) storcli /c0/v0 set rdcache=nora
** LSI does not recommend using the Always Read Ahead policy[4]
Setting the Write Policy in a Virtual Drive[5]
Storcli /cx/v(x|all) set wrcache=wt|wb|awb (write cache to write back, write through, or always write back)
Write Policy | Description | Some recommendation |
---|---|---|
Write Back | The controller sends a data transfer completion signal to the host when the controller
cache receives the data in a transaction. If you select the Write Back policy and the battery is absent, the firmware disables the Write Back policy and defaults to the Write Through policy. |
Write-back is more efficient in environments with “bursty” write activity. |
Write Through | The controller sends a data transfer completion signal to the host when the drive
subsystem receives all the data in a transaction. |
LSI recommends using the Write-through policy for RAID 0, RAID 1, and RAID 10 configurations with streaming or sequential data reads, because it can avoid
copying data into a cache
formance in RAID 0, RAID 1, and RAID 10 configurations with transactional (random real-world) reads. LSI recommends using the Write-back policy to achieve optimum performance in all RAID 5 and RAID 6 configurations because it can improve the performance of data redundancy generation. |
Always Write Back | The controller sends a data transfer completion signal to the host when the controller
cache receives all the data in a transaction. If you select the Always Write Back policy and the battery is absent, the firmware is forced to use the Write Back policy. |
Listup available HDDs to create RAID disk group under controller #0
Before we begin to initialize and create RAID disk group, we would need to check and the necessary disk information.
NOTE: Newly added physical disks will be under the status, UGOOD (Unconfigured Good)
$ sudo storcli /c0/eall/sall show
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
=================
-----------------------------------------------------------------------------
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type
-----------------------------------------------------------------------------
0:0 4 UGood - 10.913 TB SAS HDD N N 512B HUH721212AL5200 U -
0:1 3 UGood - 10.913 TB SAS HDD N N 512B HUH721212AL5200 U -
0:2 2 UGood - 10.913 TB SAS HDD N N 512B HUH721212AL5200 U -
0:3 1 UGood - 10.913 TB SAS HDD N N 512B HUH721212AL5200 U -
0:4 6 UGood - 10.913 TB SAS HDD N N 512B HUH721212AL5200 U -
0:5 5 UGood - 10.913 TB SAS HDD N N 512B HUH721212AL5200 U -
-----------------------------------------------------------------------------
** Some disks may have the ‘F’ indicator which means that the disk came from a previously configured RAID group in a different server. To delete any foreign drives, simply enter the following command: –
$sudo storcli /c0 /fall delete
Create RAID1 group for OS
To protect OS boot issue, RAID1 (mirror with two disk) would increase safty on OS bootup under enterprise environment.
Folloing shows RAID1 configuration example using two 1TB SSD for OS
$ sudo storcli /c0 /vall show
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-42-generic
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC Size Name
---------------------------------------------------------------
0/0 RAID1 Optl RW No RWTD - ON 931.000 GB OS
---------------------------------------------------------------
Create RAID group
add the disks into a single virtual disk group via the add vd command. In this case, we will setup a RAID Level 6 disk group with RAID6.
# Create RAID6 disk group with 6 HDDs range 0:0-5 as name RAID6
$ sudo storcli /c0 add vd r6 name=RAID6 drives=0:0-5
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Controller = 0
Status = Success
Description = Add VD Succeeded.
# Verify RAID6 disk group
$ sudo storcli /c0/vall show
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC Size Name
---------------------------------------------------------------
0/0 RAID6 Optl RW No RWTD - ON 43.654 TB RAID6
---------------------------------------------------------------
$lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 43.7T 0 disk <<< VD name RAID6 is available on OS
#make GPT partition
$ sudo parted -s -a optimal /dev/sda mklabel gpt mkpart primary 0% 100%
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 43.7T 0 disk
└─sda1 8:1 0 43.7T 0 part
#Make filesystem
$ sudo sudo mkfs.ext4 /dev/sda1
Delete RAID6 disk groups
To delete exist disk groups, use del command options
$ sudo storcli /c0/v0 del
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Controller = 0
Status = Success
Description = Delete VD succeeded
hpcmate@shannon-nas:~$ sudo storcli /c0/vall show
CLI Version = 007.2310.0000.0000 Nov 02, 2022
Operating system = Linux 5.4.0-153-generic
Controller = 0
Status = Success
Description = No VD's have been configured.
Remove a dedicated (DHS) or global hot spare (GHS)[6]
Determine enclosure and slot with this command:
storcli /c0/eall/sall show
storcli /c0/ex/sx delete hotsparedrive
Determine GHS disk's enclosure and slot with this command:
storcli /c0/eall/sall show
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type
-------------------------------------------------------------------------------------
...
65:10 6 UGood - 10.913 TB SAS HDD N N 512B MG07SCA12TE U -
65:11 3 GHS - 10.913 TB SAS HDD N N 512B MG07SCA12TE U -
66:0 10 UGood - 10.913 TB SAS HDD N N 512B MG07SCA12TE D -
To remove the disk, you first have to turn it into a UGOOD - "unconfigured good" disk by deleting the hotspare status:
storcli /c0/e65/s11 delete hotsparedrive
The drive will now look like this:
65:11 3 UGood - 10.913 TB SAS HDD N N 512B MG07SCA12TE U -
Now you can turn it off using
storcli /c0/e65/s11 set offline
which changes the state to:
65:11 3 UGood - 10.913 TB SAS HDD N N 512B MG07SCA12TE D -
^
(the value in the "Sp" = Spun column changed from "U" = Up to "D" = Down).
Location of HDDs[7]
# Blinking HDD to find location, controller 0, Enclosure0, slot 2
$ sudo storcli /c0/e0/s2 start locate
# To stop blinking
$ sudo storcli /c0/e0/s2 stop locate
Storcli Commands Summary[8]
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 |
storcli /cx show
storcli /cx show all storcli /cx show freespace storcli /cx set rebuildrate=<value> storcli /cx show rebuildrate storcli /cx show rebuild |
Drive Commands | information and perform actions related to physical drives
storcli /cx[/ex]/sx show torcli /cx[/ex]/sx set properties where,
|
Sets physical drive properties
Shows virtual drive information Shows virtual drive information
|
Virtual Drives Commands | Creates/Delete/Set/Show virtual drives | storcli /cx/vx show init
storcli /cx/vx start init [full][Force] (default is fast) storcli /cx/vx stop init |
Change Virtual Drive Properties Commands
LSI recommends direct io for all RAID leveliopolicy,
If you have a UPS you can leave them on, if you don't then they should be off or else you risk data loss. On most servers in the datacenter they will generally be using OEM firmware that uses the cache in a read only mode. (The equivalent of off) Writes will be cached by the RAID card with battery backed memory. |
storcli /cx/vx set accesspolicy=<rw|ro|blocked|rmvblkd>
storcli /cx/vx set cachedbadbbu=<on|off> storcli /cx/vx set iopolicy=<cached|direct> storcli /cx/vx set name=<namestring> storcli /cx/vx set pdcache=<on|off|default> storcli /cx/vx set rdcache=<ra|nora> storcli /cx/vx set security storcli /cx/vx|vall set ssdcaching=<on|off> storcli /cx/vx set wrcache=<wt|wb|awb> | |
Preserved Cache Commands | storcli /cx/vx delete preservedCache [force]
storcli /cx show preservedCache | |
erases the data on the virtual drive | storcli /cx/vx erase [force] | |
virtual drive migration (reconstruction) | storcli /cx/vx show migrate
storcli /cx/vx start migrate <type=raidlevel> [option=<add|remove> disk=<e1/s1,e2/s2 ...> ] | |
Virtual Drive Consistency Check Commands | storcli /cx/vx pause cc
storcli /cx/vx resume cc storcli /cx/vx show cc storcli /cx/vx start cc [force] storcli /cx/vx stop cc | |
Background Initialization Commands | storcli /cx/vx resume bgi
storcli /cx/vx set autobgi=<on|off> storcli /cx/vx show autobgi storcli /cx/vx show bgi storcli /cx/vx stop bgi storcli /cx/vx suspend bgi | |
Virtual Drive Expansion Commands | storcli /cx/vx expand size=<value> [expandarray]
storcli /cx/vx|vall show expansion | |
Foreign Configurations Commands | commands to view, import, and delete foreign configurations: | storcli /c0/fall show preview foreign
storcli /c0/fall import preview storcli /c0/fall show all storcli /cx/fx|fall del|delete [ securitykey=ss... ] storcli /cx/fx|fall import [preview][ securitykey=ss... ] storcli /cx/fx|fall show [all] [ securitykey=ss... ] |
BIOS-Related Commands | storcli /cx autobootselect(abs)=<on|off>
storcli /cx set bios=<on|off> storcli /cx set headlessafemode|hsm=<on/off> storcli /cx set headlesscontinueonerror|hcoe=<on/off> storcli /cx set stoponerror|soe=<on|off> storcli /cx show bios | |
OPROM BIOS Commands | storcli /cx/ex/sx set bootdrive=on|off
storcli /cx/vx set bootdrive=on|off storcli /cx show bootdrive | |
Drive Group Commands | storcli /cx/dall show
storcli /cx/dall show all storcli /cx/dall show cachecade | |
Dimmer Switch Commands | Dimmer Switch is the power-saving policy for the virtual drive | storcli/c0 show ds
storcli /cx/vx set ds=<default | auto | none | max | maxnocache> |
BBU Commands | [[HBA/RAID controller#BBU vs CacheVault vs CacheCade[4]]] | Old version of storcli,
storcli /cx/bbu show storcli /cx/bbu show all storcli /cx/bbu set bbuMode=<value> storcli /cx/bbu set learndelayinterval=<value> storcli /cx/bbu set powermode=sleep storcli /cx/bbu set writeaceess=sealed storcli /cx/bbu show modes storcli /cx/bbu show properties storcli /cx/bbu show status storcli /cx/bbu start learn |
CV Commands | Recent Versions of Storcli now use the /cv command instead of bbu[9] | $ sudo storcli /cx/cv show all |
Enclosure Commands | shows the enclosure status and the status of all the enclosure elements | storcli /cx/ex download src=filepath[forceActivate]
storcli /cx/ex show all storcli /cx/ex show status |
PHY Commands | shows PHY layer information, sets the PHY link speed | storcli /cx/px|pall set linkspeed=0(auto)|1.5|3|6|12
storcli /cx/px|pall show storcli /cx/px|pall show all |
Logging Commands | generate and maintain log files | storcli /cx clear events
storcli /cx delete termlog storcli /cx show events file=<absolute path> storcli /cx show eventloginfo storcli /cx show termlog type=config|contents |
Hot spare Command | Sets a global hot spare drive as an emergency hot spare drive
Enables or disables the emergency hot spare. When this function is enabled, all ugood drives can be used as emergency hot spare drives. Enables the emergency hot spare when a SMART error occurs. Queries the emergency hot spare drives. |
storcli /cx set eghs [state=state]
storcli /cx set eghs eug=state storcli /cx set eghs smarter=state storcli /cx show eghs |
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.
storcli /c0 set jbod=on|off 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 |
Usefull commands
Add a disk to an existing RAID[10]
If we need more space in your RAID, we can add disks to the already existing array. This example adds disk in enclosure 8 slot 0 to the existing RAID 5. *** RAID 00, 10, 50 and 60 can’t be expanded this way:
# storcli /c0/v0 start migrate type=raid5 option=add drives=8:0
Replace disk in the RAID
If a disk has failed but the RAID is still up, we can replace the failed disk. Following example adds the disk in enclosure 8 slot 0 to DriveGroup 0 array 0 row 0 where the failed disk was before. The failed disk has to be in a Missing state before it can be replaced:
# storcli /c0/e8/s0 insert dg=0 array=0 row=0
After the disk has been added, the disk will be set in a rebuild state automatically and will be added to the RAID. You can start the rebuild manually with the following command:
# storcli /c0/e8/s0 start rebuild
Print disk serial number[11]
$ sudo storcli /c0/eALL/sALL show all | egrep 'Device attributes|SN = '
Check disk status with smartctl
Check device id with storcli for each drive in order to fully test them with smartmontools.
sudo storcli /c0/eall/sall show EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type ------------------------------------------------------------------------------------- ... 134:0 5 Onln 0 931.000 GB SATA SSD Y N 512B Samsung SSD 870 EVO 1TB U - 134:1 1 Onln 0 931.000 GB SATA SSD Y N 512B Samsung SSD 870 EVO 1TB U - ... Then, use the DID for smartctl smartctl -d megaraid,1 -a /dev/sda
HPCMATE provides disk health check python script on SS System by default. find more on disk health check of SS System manual.
To clear / erase the status of a disk
storcli /cx/ex/sx start erase simple
vd command complains "physical disk does not have appropriate attributes"[12]
When a disk is pulled and put back in, the controller might consider this disk's configuration "foreign" (DG=F). This will prevent the controller from using the disk, and attempts to add VD on this PD will fail.
In "storcli /c0 show" output, EID:Slt state is "UBad" and DG is "F": 1. Clear the "Ubad" state of the PD storcli /cx/ex/sx set good Controller = 0 Status = Success Description = Set Drive Good Succeeded. 2. Delete the foreign configuration storcli /c0/fall del Controller = 0 Status = Success Description = Successfully deleted foreign configuration 3. Verify the foreign configuration with "storcli /c0/fall show"
Hot spare drives[13]
A hot spare is an extra, unused drive that is part of the disk subsystem. It is usually in Standby mode, ready for service if a drive fails.
Hot spares let you replace failed drives without system shutdown or user intervention. The controller supports automatic and transparent rebuilds of failed drives using hot spare drives, which provide a high degree of fault tolerance and zero downtime.
The failed drive is removed from the virtual drive and marked ready awaiting removal after the rebuild to a hot spare begins. You can make hot spares of the drives that are not in a RAID virtual drive.
Types of hot spare
type | Description | Example |
---|---|---|
Global hot spare | Sets a global hot spare drive. | storcli /cx/ex/sx add hotsparedrive |
Dedicated hot spare | Sets a dedicated hot spare drive. | storcli /cx/ex/sx add hotsparedrive [dgs=<N|0,1,2..>] |
Deletes the hot spare drive. | storcli /cx/ex/sx delete hotsparedrive |
** NOTE Affinity cannot be removed after it is set for a hot spare drive.[14]
If the hot spare is designated as having enclosure affinity, it tries to rebuild any failed drives on the backplane in which it resides before rebuilding any other drives on other backplanes.
Enable the emergency hot spare function and allow the emergency hot spare function to be used when a SMART error occurs
storcli /cx set eghs eug=on storcli /cx set eghs smarter=on
Direct mode / Persistent mode / Device IDs [15]
- Persistent mode (directpdmapping=off)(the default) device IDs can change, and increment, or be different even on new controllers depending on what was connected during the LSI manufacturing process. Persistent mode is good for expanders.
- Direct mode (directpdmapping=on) device IDs never change, and always match the phy number.
#To check the current setting:
syntax: storcli /cx show directpdmapping
example: storcli /c0 show directpdmapping
#To enable direct PD mapping:
syntax: storcli /cx set directpdmapping=on
example: storcli /c0 set directpdmapping=on
#To disable direct PD mapping:
syntax: storcli /cx set directpdmapping=off
example: storcli /c0 set directpdmapping=off
References
- ↑ https://docs.broadcom.com/doc/12352476
- ↑ https://www.supermicro.com/CaseStudies/6Gbs_LSI_b.pdf
- ↑ https://www.supermicro.com/CaseStudies/6Gbs_LSI_b.pdf
- ↑ https://www.supermicro.com/CaseStudies/6Gbs_LSI_b.pdf
- ↑ https://techdocs.broadcom.com/content/dam/broadcom/techdocs/data-center-solutions/tools/generated-pdfs/12Gbs-MegaRAID-Tri-Mode-Software.pdf
- ↑ https://serverfault.com/questions/1039080/how-do-i-remove-a-dedicated-dhs-or-global-hot-spare-ghs
- ↑ https://www.thomas-krenn.com/en/wiki/StorCLI_commands#Creating_a_Virtual_Drive
- ↑ https://docs.broadcom.com/doc/12352476
- ↑ https://support.siliconmechanics.com/portal/en/kb/articles/bbu-commands-for-storcli
- ↑ https://asergo.com/knowledge-base/bare-metal-servers/raid/storcli.html#set-jbod-mode
- ↑ https://serverfault.com/questions/751167/finding-the-serial-number-of-hard-disk-drives-on-a-supermicro-server-running-meg
- ↑ https://www.dell.com/support/kbdoc/en-us/000052902/storcli-add-vd-command-complains-physical-disk-does-not-have-appropriate-attributes
- ↑ https://support.huawei.com/enterprise/en/doc/EDOC1000163569/384a4f9e/common-storcli-commands
- ↑ https://docs.broadcom.com/doc/12352476
- ↑ https://www.broadcom.com/support/knowledgebase/1211161503520/direct-mode---persistant-mode---device-ids-on-megaraid