wiki:MegaRaid

Version 8 (modified by joshuadf, 7 years ago) (diff)

--

LSI MegaRaid controllers

The Dell Linux website has information about the actual manufacturer of each PowerEdge RAID Controllers (PERC) HardwareRaid cards. The Dell PERC 5i in thorax is a LSI MegaRAID SAS 8480e and other servers have PERC 6i (LSI MegaRaid 1078) which support SAS or SATA drives up to 2TiB. Newer PERCs models such as the H800 support 3+ TiB drives.

The MegaRaid PERC cards have many features including (PDF) Patrol Read, which regularly reads every block of each disk to catch errors that a RAID5 consistency check would miss.

MegaCli tool

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. Arguments are 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.

The LSI website seems to change every time I look, but currently you can get the tool by searching for "MegaCli Linux". The latest version right now is MegaRAID SAS MegaCLI - Linux, Version 8.01.06 and comes as RPMs inside a zip inside another zip:

# worked as of June 2011
wget 'http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.01.06_Linux_MegaCLI.zip'
unzip 8.01.06_Linux_MegaCLI.zip 
rm -f readme.txt 
unzip MegaCliLin.zip
ls *rpm 
# rpm -i or extract files with rpmdev-extract 

MegaCli installs to /opt/MegaRAID/MegaCli/MegaCli64 so I link to /sbin/

ln -s /opt/MegaRAID/MegaCli/MegaCli64 /sbin/MegaCli
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /sbin/MegaCli64

Other sources of MegaCli tips:

Tasks

Verify aka Logical Disk Consistency Check (LDCC):

# find Virtual Disk and Adapter 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

Add dedicated Hot Spare to RAID array 1 (using disk in slot 2 of Enclosure device 8 but some systems do not have an Enclosure so commands look like -PhysDrv [:2] instead of -PhysDrv [8:2].):

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

Listing Adapter, Enclosure, and Slot information:

# MegaCli -PDList -aALL | egrep 'Adapter|Enclosure|Slot|Inquiry' 
Adapter #0
Enclosure Device ID: 8
Slot Number: 0
Enclosure position: 0
Inquiry Data: SEAGATE ST373455SS      S5273LQ2164C            
Enclosure Device ID: 8
Slot Number: 2
Enclosure position: 0
Inquiry Data:             9QJ03V5EST31000340AS                            SD15    
Enclosure Device ID: 8
Slot Number: 3
Enclosure position: 0
Inquiry Data:             9QJ00DMGST31000340AS                            SD01    
Enclosure Device ID: 8
Slot Number: 4
Enclosure position: 0
Inquiry Data:             9QJ01AP9ST31000340AS                            SD01    
Enclosure Device ID: 8
Slot Number: 5
Enclosure position: 0
Inquiry Data:             9QJ01E9LST31000340AS                            SD01    

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

Check on Patrol Read

MegaCli -AdpPR Info -a0
#                                     
# Adapter 0: Patrol Read Information:
# 
# Patrol Read Mode: Auto
# Patrol Read Execution Delay: 168 hours
# Number of iterations completed: 116 
# Current State: Stopped
# 
# Exit Code: 0x00

Adapter info

MegaCli -AdpAllInfo -aALL |head
                                     
Adapter #0

==============================================================================
                    Versions
                ================
Product Name    : PERC 6/i Adapter
Serial No       : 1122334455667788
FW Package Build: 6.3.0-0001

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

Detailed internal logs

MegaCli -AdpEventLog -IncludeDeleted -f myAdpEventLog.txt -aALL
MegaCli -FwTermLog -Dsply -aALL     > myFirmwareLog.txt

Bootable Virtual Disk

From Ron:

- Press ctrl-r as system boots and enter perc 6i setup utility. 
- Hit ctrl-n to get to the ctrl management screen, and then select "bootable VD" in bottom left of screen.
- I checked "enable controller bios", but not sure if it was really necessary. 

This manual looked helpful, but really wasn't necessary:

http://public.support.unisys.com/pcproducts/esx/docs/DellDocs5.4/en/Perc6i_6e/chapterg.htm

Open Manage Server Administrator (OMSA)

Dell also provides the Open Manage Server Administrator (OMSA), a collection of daemons for PERC, DRAC, and other Dell server components.

You can also update firmware (BIOS, RAID, etc) on many Dell systems via OMSA. Install the Dell yum repositories with commands such as:

wget -q -O - http://linux.dell.com/repo/community/bootstrap.cgi | bash
wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
wget -q -O - http://linux.dell.com/repo/software/bootstrap.cgi | bash 
# OMSA storage daemon
yum -y install rpmdevtools ipmitool OpenIPMI srvadmin-base 
yum -y install srvadmin-storageservices
# firmware BIOS etc updates
# http://linux.dell.com/wiki/index.php/Repository/firmware#Putting_it_all_together
wget -q -O - http://linux.dell.com/repo/firmware/bootstrap.cgi | bash
# install firmware tools
yum -y install firmware-addon-dell
# install BIOS update
yum -y install $(bootstrap_firmware)
# this gives interactive warnings/confirmation
update_firmware