Saturday, November 6, 2010

Article: LSI Megaraid and Ubuntu

[Abstract]
In this post i will show how to get managing utilities for LSI Megaraid controllers working under Ubuntu and probably most other Debian-based distributions (with some alterations).

[Prerequisites]
This has been tested on Ubuntu 10.04 and 10.10 with a Dell Perc5/i.

[General]
So I figured I should add a small entry about this since it took me quite a while to figure it out.

I'm running a Dell Perc5/i in my main server at home and managing the disks requires add-in software as the bios setup only has limited capabilites.

Megaraid controllers can officially be controlled in two ways. Megaraid storage manager or Megacli. Neither of these have been released for anything else than Red hat, leaving us Debian wannabees in the cold.

Furthermore, Megaraid storage manager requires X (GUI only) and java, so i'm not all that keen on using in on my cli only server. We're left with Megacli which suffers from a lot of negative reviews regarding documentation and user friendlyness. While that is partially true i have found that it is actually quite good once you figure it out and if you know where to look you can find some decent documentation as well.

[Installing Megacli on Ubuntu]
Fortunately for us, there is a wonderful site called HWRAID with some documentation and also precompiled versions for Devbian and Ubuntu. Lucky us!

To install Megacli on Ubuntu just follow these simple steps
1. Edit /etc/apt/sources.list with your favorite text editor. I use nano so my command looks like this: sudo nano /etc/apt/sources.list
2. At the bottom, add the following line deb http://hwraid.le-vert.net/ubuntu jaunty main (jaunty is for 9.04 or later, replace accordingly if you are using an older version)
3. Update aptitude using the following command: sudo apt-get update
4. Install Megacli using the following command: sudo apt-get install megacli

[Finding some documentation]
I promised you documentation as well. HWRAID has some basic info in the syntax of megacli but it doesn't cover everything. A more complete guide is provided by Dell, namely a pdf document called Managing PERC 6 with MegaCli under Solaris 10 which at the moment can be found here.
I found that while this document provides some more in depth information about the commands, it's not entirely correct on the syntax. Some commands are specified without hyphen but doesn't work unless it's included. You might need to use your imagination and some trial and error to get everything working.

Feel free to ask any questions or add comments regarding this post in the comments. I'll try and answer best i can, promise.

Cheers

4 comments:

  1. Thanks for this post, really helpful!

    ReplyDelete
  2. I am getting this error after adding the source to the list and updating:
    Err http://hwraid.le-vert.net/ubuntu/ jaunty/main megacli 8.02.16-1
    404 Not Found
    Failed to fetch http://hwraid.le-vert.net/ubuntu/pool-jaunty/megacli_8.02.16-1_amd64.deb 404 Not Found
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    I've tried both update and fix-missing with no luck.
    Anyone else have this issue? Any suggestions?

    ReplyDelete
    Replies
    1. Browsing the archive at http://hwraid.le-vert.net/ubuntu it seems like they have removed some old packages. They've left them in the package lists though, which is kinda odd.

      The only pools left are hardy and lucid (which are LTS) and then natty and onwards.

      You could compile from source or try and find another site with the old packages but it might be easier to just upgrade.

      I'm not sure what would happen if you tried to install the lucid package on jaunty but you could give it a try. Edit your sources.list and replace jaunty with lucid for hwraid.le-vert.net, do an apt-get update and try again.

      Cheers

      Delete
    2. That worked like a charm. Thank you for your quick response!

      Delete