How do I check LSI MegaRAID controller and raid array status on a linux server
Use the LSI MegaRAID megarc command line cli tool
Download the megarc tool
Download the megarc.bin utility which can be downloaded from LSI website at http://www.lsi.com/downloads/Public/MegaRAID
# mkdir /opt/LSI_MegaRAID
# unzip ut_linux_megarc_1.11.zip
# chmod 700 megarc
How to check LSI MegaRAID status with megarc
Check all Logical drives on Adapter “0″
# ./megarc -ldInfo -a0 -Lall
LSI MegaRAID – How to rebuild a degraded array with monitoring
Posted on Friday, October 29th, 2010 under Uncategorized
I ran into this problem this week and found some pretty neat commands to help with the process. The commands a quite long and/or annoying so I’m going to run through it here so I have something to look back to and so it can help someone else.
First of all, the card I’m working with is a: MegaRAID SATA 150-4D
You’ll need this file (which should be downloaded onto the machine itself)
Unzip this and you’ll find a file called megarc.bin – This is what we’ll use
OK so, to check the status of the RAID run:
./megarc.bin -ldInfo -a0 -Lall
Which will show:
Logical Drive 0 : SpanLevel_0 Disks
Chnl Target StartBlock Blocks Physical Target Status
—- —— ———- —— ———————-
0 00 0×00000000 0x12a17800 FAIL
0 01 0×00000000 0x12a17800 ONLINE
0 02 0×00000000 0x12a17800 ONLINE
So we now, open the server and replace disk in port 00. The RAID card will state the port numbers on it, trace back the SATA cable to the drive.
When the server boots, hit Ctrl+M or press Enter when prompted by the RAID card. Hit the “Rebuild option” then hit F10.
It’ll show a progress bar, but don’t mind that, hit Ctrl + Alt + Del and reboot it. The RAID will continue to rebuild whilst the server can be online.
To track the progress of the RAID’s rebuild run:
./megarc.bin -showRbld -a0
If you wish (and I recommend you do) to increase the built rate from the default 30% to 80% run:
./megarc.bin -setRbldRate 80 -a0
That’s pretty much it, wait for your RAID to cook and your done.