LSI MegaRaid controllers

The Dell Linux website has information about the actual manufacturer of its embedded PowerEdge RAID Controllers (PERC) HardwareRaid cards. The Dell PERC 5i in thorax is a LSI MegaRAID SAS 8480e.

The PERC 5i PDF Cheat Sheet is extremely helpful. The MegaCli tool's documentation is poor and user interface is even worse, especially for simple tasks. It is not case sensitive so you may mix case to make commands slightly readable. You also must specify which Adapter for every command with -a0 or -aALL.

Verify aka Consistency Check:

# find Virtual Disk number
MegaCli -LDInfo -Lall -aALL
# start on Virtual Disk L1 on Adapter 0
MegaCli -LDCC -Start -L1 -a0
# show progress
MegaCli -LDCC -ShowProg -L1 -a0

Creating a RAID5 virtual disk from slots 2,3,4 in Enclosure device 8 of Adapter 0, with slot 5 as hot spare:

MegaCli -CfgLdAdd -r5 '[8:2, 8:3, 8:4]' -hsp '[8:5]' -a0

Finding out the Adapter, Enclosure, and Slot information:

# MegaCli -PDList -aALL | egrep 'Adapter|Enclosure|Slot|Inquiry' 
Adapter #0
Enclosure Device ID: 8
Slot Number: 0
Inquiry Data: SEAGATE ST373455SS      S5273LQ2164C
Enclosure Device ID: 8
Slot Number: 2
Inquiry Data: ATA     ST31000340AS    SD01            9QJ01NZ6
Enclosure Device ID: 8
Slot Number: 3
Inquiry Data: ATA     ST31000340AS    SD01            9QJ00DMG
Enclosure Device ID: 8
Slot Number: 4
Inquiry Data: ATA     ST31000340AS    SD01            9QJ01AP9
Enclosure Device ID: 8
Slot Number: 5
Inquiry Data: ATA     ST31000340AS    SD01            9QJ01E9L

Add dedicated Hot Spare to RAID array 1 (using disk in slot 2 of Enclosure device 8):

MegaCli -PDHSP -Set -Dedicated -Array1 -PhysDrv '[8:2]' -a0

Finding out the RAID config (Reference == Array):

# MegaCli -CfgDsply -aAll | egrep 'Reference|RAID|Slot|Data|^$'

Span Reference: 0x00
RAID Level: Primary-0, Secondary-0, RAID Level Qualifier-0
Slot Number: 0
Inquiry Data: SEAGATE ST373455SS      S5273LQ2164C

Span Reference: 0x01
RAID Level: Primary-5, Secondary-0, RAID Level Qualifier-3
Slot Number: 5
Inquiry Data: ATA     ST31000340AS    SD01            9QJ01E9L

Slot Number: 3
Inquiry Data: ATA     ST31000340AS    SD01            9QJ00DMG

Slot Number: 4
Inquiry Data: ATA     ST31000340AS    SD01            9QJ01AP9