KB450012 – StorCLI

Last modified: December 2, 2019
You are here:
Estimated reading time: 1 min

Two great Storcli documents can be found at:

https://www.thomas-krenn.com/en/wiki/StorCLI
https://communities.cisco.com/docs/DOC-59532

Step 1 – Download Storcli

curl -LO http://images.45drives.com/Firmware/LSI9361/storcli/Linux/storcli-007.0606.0000.0000-1.noarch.rpm

Step 2 – Extract the rpm package to a directory

Once the rpm package is extracted to a directory on the server, change into that directory and run it:
‘yum install storcli-007.0606.0000.0000-1.noarch.rpm’

This will install the storcli tool and place it in /opt/MegaRAID/storcli

Step 3 – Using the Storcli tool

Whenever using the Storcli tool in the command line, you must first change to the directory mentioned above à ‘cd /opt/MegaRAID/storcli’

To check the status of all drives connected to a controller, use the following command:
‘./storcli64 /cx/eall/sall show’

This will result in an output like the following, which tells the user which slot of the controller each drive is plugged into, along with the corresponding state of each drive.

 

When dealing with failed drives in an array, the following are the steps to take:
1. Set the failed drive as Offline ‘./storcli64 /cx/ey/sz set offline’
x = Controller number
y = Encolsure Device ID (Seen above as EID)
z= Controller defined slot number
2. Set the failed drive as Missing ‘./storcli64 /cx/ey/sz set missing’
3. Spindown the failed drive  ‘./storcli64 /cx/eall/sy spindown’
4. Remove the failed drive and replace it with a new drive (same model)
5. The rebuild should start automatically (If configured) and can be monitored  ‘./storcli64 /cx/eall/sall show rebuild’
If auto rebuild isn’t turned on ‘./storcli64 /cx/ey/sz insert dg=0 array=0 row=0
(dg, array, row correspond to the Topology table from ‘./storcli64 /cx show all’)
Then start the rebuild manually ‘./storcli64 /cx/ey/sz start rebuild’
(Topology table will have state ‘Rbld’ for that drive)

Aside:
One can increase the rebuild rate, as its default is set to 30%, but increasing this will decrease I/O performance. à ‘./storcli64 /cx set rebuildrate=A’    (A = Number ranging from 0-100.)

Relating physical location of hard drives in the server to the Storcli tool can be seen in the tables provided below, based on a 45 Drive chassis.

Controller 0

Controller Slot Physical Chassis Slot
0 1-1
1 1-2
2 1-3
3 1-4
4 1-5
5 1-6
6 1-7
7 1-8
8 1-9
9 1-10
10 1-11
11 1-12
12 1-13
13 1-14
14 1-15

 

Controller 1

Controller Slot Physical Chassis Slot
0 2-1
1 2-2
2 2-3
3 2-4
4 2-5
5 2-6
6 2-7
7 2-8
8 2-9
9 2-10
10 2-11
11 2-12
12 2-13
13 2-14
14 2-15

 

* Since there is only one drive on the last port of the controller, the controller sees the drive as on the fourth port of the wire instead of the first. This is due to the type of cable used.

Was this article helpful?
Dislike 0
Views: 120
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access