===== LSI MegaRAID =====
{{tag>General VMware}}
==== StoreCLI ====
\\
**All examples below are based on the stand alone StorCLI. If the VIB installed version of StorCLI is used the path to "storcli" will be different and may be in /opt.**
\\
Show details, including model and serial number, for disk in slot 1 in default enclosure 252 on controller 0;
/vmfs/volumes/ISOs # ./storcli /c0 /e252 /s1 show all
Show details for all disks in all enclosures on all controllers;
/vmfs/volumes/ISOs # ./storcli /call /eall /sall show all
\\
Set disk in slot 1 in default enclosure 252 on controller 0 as good;
/vmfs/volumes/ISOs # ./storcli /c0 /e252 /s1 set good force
\\
Create RAID-0 on disk in slot 1 in default enclosure 252 on controller 0;
/vmfs/volumes/ISOs # ./storcli /c0 add vd r0 size=all drives=252:1 WT nora direct
\\
Start LED flashing to locate disk in slot 2 in default enclosure 252 on controller 0;
/vmfs/volumes/ISOs # ./storcli /c0 /e252 /s2 start locate
\\
Enclosure 252 is the default enclosure that exists on all controllers. This is based on my experience with MegaRAID controllers that have only internal ports in use.
\\
===Drive replacement===
Replace a failed drive
/opt/lsi/storcli/storcli /c0 show
/opt/lsi/storcli/storcli /c0 /e252 /s0 start locate
/opt/lsi/storcli/storcli /c0 /e252 /s0 stop locate
/opt/lsi/storcli/storcli /c0 /e252 /s0 set offline
/opt/lsi/storcli/storcli /c0 /e252 /s0 set missing
##
## Physically replace drive
## Auto-rebuild may start
##
/opt/lsi/storcli/storcli /c0 /e252 /sall show rebuild
If manual rebuild some of the following commands may be needed
/opt/lsi/storcli/storcli /c0 /e252 /s0 set good
/opt/lsi/storcli/storcli /c0 /e252 /s0 add hotsparedrive
/opt/lsi/storcli/storcli /c0 /e252 /s0 inset dg=0 array=0 row=0
/opt/lsi/storcli/storcli /c0 /e252 /s0 start rebuild
/opt/lsi/storcli/storcli /c0 /e252 /sall show rebuild
The dg, array, and row values come from the following;
TOPOLOGY :
========
-------------------------------------------------------------------------------
DG Arr Row EID:Slot DID Type State BT Size PDC PI SED DS3 FSpace TR
-------------------------------------------------------------------------------
0 - - - - RAID10 Dgrd N 3.633 TB dflt N N none N N
0 0 - - - RAID1 Dgrd N 930.390 GB dflt N N none N N
0 0 0 252:0 5 DRIVE Failed Y 930.390 GB dflt N N none - N
0 0 1 252:1 0 DRIVE Onln N 930.390 GB dflt N N none - N
0 1 - - - RAID1 Dgrd N 930.390 GB dflt N N none N N
0 1 0 252:2 4 DRIVE Onln N 930.390 GB dflt N N none - N
0 1 1 252:3 2 DRIVE Onln N 930.390 GB dflt N N none - N
0 2 - - - RAID1 Dgrd N 930.390 GB dflt N N none N N
0 2 0 252:4 6 DRIVE Onln N 930.390 GB dflt N N none - N
0 2 1 252:5 1 DRIVE Rbld Y 930.390 GB dflt N N none - N
0 3 - - - RAID1 Dgrd Y 930.390 GB dflt N N none N N
0 3 0 252:6 7 DRIVE Onln N 930.390 GB dflt N N none - N
0 3 1 252:7 3 DRIVE Onln N 930.390 GB dflt N N none - N
-------------------------------------------------------------------------------