Skip to main content

RAID Configuration Using StorCLI

For our Root Server Dual and Root Server Storage, Nine uses Intel server hardware with a dedicated RAID controller Integrated RAID Module RMS25CB080. This article covers the initial setup of a RAID array and provides usage tips. For advanced configurations, refer to the Broadcom StorCLI manual.

StorCLI

To configure, modify, or monitor the hardware RAID, you can use the tool StorCLI. StorCLI is a command-line tool for managing LSI controllers (formerly MegaRAID controllers and the successor of MegaCLI).

Download

StorCLI is available through the Intel download site and must be run as root.

Download: https://www.intel.com/content/www/us/en/download/17809/820588/storcli-standalone-utility.html.

Installation

Unzip the outer archive:

root@root-server-dual:~# unzip StorCLI_007.2705.0000.0000.zip
root@root-server-dual:~# cd StorCLI_007.2705.0000.0000/

Unzip the binaries and packages:

root@root-server-dual:~/StorCLI_007.2705.0000.0000# unzip Unified_storcli_all_os.zip

The package for Debian/Ubuntu can be found in the Unified_storcli_all_os/Ubuntu subdirectory. For CentOS/RHEL, the package is under Unified_storcli_all_os/Linux.

root@root-server-dual:~/StorCLI_007.2705.0000.0000# dpkg -i Unified_storcli_all_os/Ubuntu/storcli_007.2705.0000.0000_all.deb
Selecting previously unselected package storcli.
(Reading database ... 416152 files and directories currently installed.)
Preparing to unpack .../storcli_007.2705.0000.0000_all.deb ...
Unpacking storcli (007.2705.0000.0000) ...
Setting up storcli (007.2705.0000.0000) ...

Usage

root@root-server-dual:~# cd /opt/MegaRAID/storcli
root@root-server-dual:/opt/MegaRAID/storcli# ./storcli64
  • Information about available controllers

    ./storcli64 show

  • Information about a specific controller and its configuration

    ./storcli64 /c0 show

This command provides an overview of the configured virtual drives (/vall) and the available hard disks:

./storcli64 /c0 /vall show all

The output includes an explanation of all abbreviations used. For example:

TOPOLOGY :
========

--------------------------------------------------------------------------
DG Arr Row EID:Slot DID Type State BT Size PDC PI SED DS3 FSpace
--------------------------------------------------------------------------
0 - - - - RAID0 Optl N 3.633 TB dflt N N none N
0 0 - - - RAID0 Optl N 3.633 TB dflt N N none N
0 0 0 252:0 8 DRIVE Onln N 930.390 GB dflt N N none -
0 0 1 252:1 9 DRIVE Onln N 930.390 GB dflt N N none -
0 0 2 252:2 10 DRIVE Onln N 930.390 GB dflt N N none -
0 0 3 252:3 11 DRIVE Onln N 930.390 GB dflt N N none -
--------------------------------------------------------------------------

DG=Disk Group Index|Arr=Array Index|Row=Row Index|EID=Enclosure Device ID
DID=Device ID|Type=Drive Type|Onln=Online|Rbld=Rebuild|Dgrd=Degraded
Pdgd=Partially degraded|Offln=Offline|BT=Background Task Active
PDC=PD Cache|PI=Protection Info|SED=Self Encrypting Drive|Frgn=Foreign
DS3=Dimmer Switch 3|dflt=Default|Msng=Missing|FSpace=Free Space Present
  • Information about available hard disks and their status (serial number, temperature, etc.)
  • /eall identifies all enclosures on the controller.
  • /sall identifies all drives on the enclosure.

./storcli64 /c0 /eall /sall show all

Creating RAIDs

Here are some examples for creating a virtual drive (RAID array):

  • Create a RAID 1

    ./storcli64 /c0 add vd type=raid1 names=tmp1 drives=252:2-3

This command creates a virtual drive using the entire available size. Use the size=100gb option to set a fixed size.

/c0 specifies the controller.

type= sets the RAID array type. Available types: raid0, raid1, raid5, and raid6.

name= sets the name of the virtual drive.

drives= specifies which drives to use for the virtual drive: drives=[EnclosureID:SlotID|:SlotID-SlotID|:SlotID,SlotID]

The following options can be set when creating a RAID array:

OptionValue RangeDescription
typeraid 0,1,5,6,10,50,60RAID type
sizeMax. size of the virtual drive based on hard disk size and RAID type.Sets the size of the virtual drive.
nameSets the name of the virtual drive.
drivese:s - e:s-x - e:s-x,ySpecifies the drives to use.
pdcacheon - offEnables or disables PD cache.
strip8, 16, 32, 64, 128, 256, 512, 1024.Sets the strip size for the RAID configuration.

For more complex RAIDs (e.g. RAID 10), you may need to additionally specify the number of disks per array:

PDperArray=

More examples:

  • Create a RAID 5

    ./storcli64 /c0 add vd type=raid5 names=tmp1 drives=252:2-6

  • Create a RAID 6

    ./storcli64 /c0 add vd type=raid6 names=tmp1 drives=252:2-7

  • Create a RAID 10

    ./storcli64 /c0 add vd type=raid10 size=200gb,300gb,400gb names=tmp1,tmp2,tmp3 drives=252:2-3,5,7 pdperarray=2

  • Show the status of all ongoing rebuilds

    ./storcli64 /c0 /eall /sall show rebuild

Migrating RAIDs

The migrate command can be used to expand a RAID array or convert it to a different RAID type.

Existing RAID arrays can be migrated to the following RAID types:

Initial RAID levelMigrated RAID level
RAID 0RAID 1
RAID 0RAID 5
RAID 0RAID 6
RAID 1RAID 0
RAID 1RAID 5
RAID 1RAID 6
RAID 5RAID 0
RAID 5RAID 6
RAID 6RAID 0
RAID 6RAID 5

Expand a RAID 5 disk array:

./storcli64 /c0/v1 start migrate raid5 option=add drive=0:0,0:1

Check the status of the expansion:

./storcli64 /c0/v1 show migrate

By default, 30% of I/O is used for the migration. This value can be queried and changed as follows:

./storcli64 /c0 show migraterate

./storcli64 /c0 set migraterate=70

Troubleshooting

Replacing a hard disk:

  • Read the hard disk serial number

./storcli64 /c0 /eall /sall show all | grep -B 2 SN

Mark a defective hard disk as offline:

./storcli64 /c0 /e252 /s1 set offline

Tell the system that the hard disk is missing. This is useful when the hard disk is about to be replaced:

./storcli64 /c0 /e252 /s1 set missing

Spin down the specified hard disk:

./storcli64 /c0 /e252 /s1 spindown

The rebuild starts automatically after inserting the new disk:

./storcli64 /c0 /eall /sall show rebuild