You are not logged in or registered. Please login or register to use the full functionality of this board...
Linuxcat.org
Installing LSI megaCLI in Ubuntu 12.04 Precise - Printable Version

+- Linuxcat.org (http://www.linuxcat.org)
+-- Forum: Linux Guides and Troubleshooting (/forumdisplay.php?fid=1)
+--- Forum: Linux Guides (/forumdisplay.php?fid=2)
+--- Thread: Installing LSI megaCLI in Ubuntu 12.04 Precise (/showthread.php?tid=68)



Installing LSI megaCLI in Ubuntu 12.04 Precise - knifebunny - 02-13-2014 01:51 PM

In order to setup the LSI megaraid megacli command line utility for managing hardware raid arrays under
Ubuntu requires a few steps


First you will need to modify your sources.list to include another repo whereby the tools can be downloaded
using apt-get

Modify /etc/apt/sources.list

and then add

"deb http://hwraid.le-vert.net/ubuntu precise main"


then do

Code:
apt-get update


apt-get install megacli megactl megaraid-status

If you get a GPG error, you will need to grab the keys

Code:
wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -

Then try again

Code:
apt-get install megacli megactl megaraid-status



Some basic megacli commands:

View information about virtual drive
Code:
megacli -LDInfo -Lall -aALL

View information about physical disks
Code:
megacli -PDList -aALL

Dump all event logs to a file
Code:
megacli -AdpEventLog -GetEvents -f logfile -aALL




Using smartmontools behind the raid controller:

You can test individual drives behind the raid controller with a bit of trickery. Smartmontools is great for diagnosing individual hard disk drives if you are concerned about the health of your raid array.

First you need to get a list of the device ids for each of the individual
drives:

Code:
[email protected]:~# megacli -pdlist -a0| grep 'Device Id'
Device Id: 9
Device Id: 10
Device Id: 11
Device Id: 8

In my example, I have a raid array with 4 disks, listed here as devices
8 through to 11, and the mounted device is /dev/sdc


We can manipulate the smartmontools commands in order to test these individual devices.

Code:
smartctl -d sat+megaraid,8 -t short /dev/sdc

this will perform a 'short test' on /dev/sdc's raid device drive no. 8

in order to view the status of the short test you can use

Code:
smartctl -d sat+megaraid,8 -l selftest /dev/sdc


this procedure can then be done for each other individual device id behind the raid array.


RE: Installing LSI megaCLI in Ubuntu 12.04 Precise - knifebunny - 02-13-2014 01:54 PM

Some other useful resources for megacli


http://erikimh.com/megacli-cheatsheet/
http://artipc10.vub.ac.be/wordpress/2011/09/12/megacli-useful-commands/