MegaRAID StorCLI

StorCLI Cheat Sheet
Description Command
Show all adaptors storcli /call show
Show all virtual drives storcli /call/vall show
Show all physical drives storcli /call/dall show all
Show all enclosures storcli /call/eall show
Show all BBU storcli /call/bbu show
Show all CacheVault storcli /call/cv show
Show all foreign configuration storcli /call/fall show
Show Rebuild state storcli /c0/e8/s0 show rebuild
Delete all foreign configuration storcli /call/fall delete
Delete all virtual drives from controller #0 storcli /c0/vall delete
Delete all virtual drives from all controllers storcli /call/vall delete
Locate physical disk storcli /c0/e8/s2 start locate
Set Controller0 to JBOD mode storcli /c0 set jbod=on
Add disk to array storcli /c0/e32/s12 insert dg=0 array=0 row=0

This section contains example configuration commands. You may need to clear the current configuration first:

# storcli /call/vall del force

Locate physical disk

If a disk needs replacing, you can enable the locater LED. This is an example for enabling locater LED on controller 0, enclosure 8, disk slot 2:

# storcli /c0/e8/s2 start locate

Add a disk to an existing RAID

If you need more space in your RAID, you 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, you can replace the failed disk. This 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

RAID 0

Configure one disk as its own RAID 0 virtual drive, this will enable you to use e.g. Linux Software RAID:

# storcli /c0 add vd r0 drives=8:0

RAID 1

In this example, we will create a RAID 1 (mirror) virtual drive, consisting of two disks. From slot 0 to 1:

# storcli /c0 add vd r1 drives=8:0-1

RAID 5

The following example will configure a RAID 5 virtual drive consisting of 8 disks from slot 0 to 7:

# storcli /c0 add vd r5 drives=8:0-7

RAID 6

The following example will configure a RAID 6 virtual drive consisting of 8 disks from slot 0 to 7:

# storcli /c0 add vd r6 drives=8:0-7

RAID 10

The following example will configure a RAID 10 virtual drive consisting of 8 disks from slot 0 to 7:

# storcli /c0 add vd r10 drives=8:0-7 pdperarray=2

Set JBOD mode

When enabling JBOD mode, all disks can be viewed individually and makes the disks open to software RAID. The following example will enable JBOD mode on controller 0:

# storcli /c0 set jbod=on

To disable JBOD mode, the following command is needed:

# storcli /c1 set jbod=off