You get a bonus - 1 coin for daily activity. Now you have 1 coin

Debian - Installing MegaCLI (CmdTool2) for Intel RAID (LSI MegaRAID)

Practice



So, we have a server with a controller that shows up as LSI Logic / Symbios Logic MegaRAID SAS or similar. In my case it was SROMBSAS18E. A hardware RAID is built on the server, and naturally we want to monitor it and manage it from the OS.

Our OS is Debian. Specifically, in my case it was Xen 4.1.3 + Debian 6 Squeeze.

The utility for managing our RAID controller is called CmdTool2 and is also produced by Intel. We head to Intel's website and see that this company has only bothered with the most minimal support for its products - utilities and drivers are available ONLY for Windows and Redhat. There is no support for Debian or for any other server OS. Sad. Doubly sad, because repackaging the packages by brute force from rpm (yes, Intel didn't even bother to publish at least the source code from which the utilities could be built with make for the needed OS) into a deb package via alien doesn't work.


Solution

I did find a solution - endless thanks to the site http://hwraid.le-vert.net/wiki/DebianPackages.

We go into /etc/apt and edit the sources.list file, adding the following line to it:
deb http://hwraid.le-vert.net/debian squeeze main

Here, instead of "/debian" you can specify "/ubuntu" if you are using Ubuntu instead of Debian, and instead of "squeeze" you can specify your distribution, for example, "lenny".

Now let's update the repos:
$ sudo apt-get update

and install the treasured utility - in our case it's called megacli:
$ sudo apt-get install megacli


Checking

$ sudo megacli -h

Intel(R) RAID Command Line Utilities Version 2
Ver 8.04.07 May 28, 2012

(c)Copyright 2011, LSI Corporation, All Rights Reserved.


NOTE: The following options may be given at the end of any command below:

[-Silent] [-AppLogFile filename] [-NoLog] [-page[N]]
[-] is optional.
N - Number of lines per page.

CmdTool2 -v
CmdTool2 -help|-h|?
CmdTool2 -adpCount
...

See that instead of megacli, the utility prompts us to enter CmdTool2? But in fact, no file with that name exists - instead there is the megacli binary, which is what we just ran. You can leave it as is, or you can create a symlink:
$ sudo ln -s /usr/sbin/megacli /usr/sbin/CmdTool2

And let's try to connect to the controller and read its settings:
$ sudo CmdTool2 -AdpAllInfo -aALL

Adapter #0

=========================================================
Versions
================
Product Name : Intel(R) RAID Controller SROMBSAS18E
Serial No :
FW Package Build: 5.1.1-0038

Mfg. Data
================
Mfg. Date : 00/00/00
Rework Date : 00/00/00
Revision No :
Battery FRU : N/A

Image Versions in Flash:
================
Boot Block Version : R.2.3.12
BIOS Version : MT30
MPT Version : MPTFW-01.18.73.00-IT
FW Version : 1.03.00-0211
WebBIOS Version : 1.03-08_02
Ctrl-R Version : 1.04-017A

......

If something was displayed - from this point on, you can already start working with the CLI interface of the RAID controller.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Diagnostics, maintenance and repair of electronic and radio equipment"

Terms: Diagnostics, maintenance and repair of electronic and radio equipment