Installing MegaCLI in Debian-based System

What is this

MegaCLI is a command line tool to manage LSI’s MegaRAID controller. With this tool we can do things without rebooting our system. We use it for MegaRAID SCSI, MegaRAID SAS, etc.

Prerequisite

Don’t forget to install rpm, cpio, and unzip. To make it simple, I install these:

$ sudo apt-get install alien unzip

alien is a utility that converts RPM to DEB. We don’t use it, but it pull bunch of tools needed for us later. We can just purge it and uninstall it after finish.

Installing

  1. Download the MegaCLI tool from LSI website.
  2. Unzip MegaCli-8.00.29-1.i386.rpm from the zip file.
  3. Install sysfsutils: $ sudo apt-get install sysfsutils
  4. Extract MegaCLI from the RPM: $ rpm2cpio MegaCli-2.00.15-1.i386.rpm | cpio -idmv
  5. Put in the /opt: $ sudo mv opt/MegaRAID /opt
  6. Done.

We will have MegaCli64 and MegaCli applications. If you see the zip file, it contains another file: Lib_Utils-1.00-08.noarch.rpm. This file contains binaries of sysfsutils version 2.0.2 and source code version 2.2.0. For security and convinient, I stick with the binary distribution from Debian/Ubuntu.

Jan Peter Alexander Rajagukguk

One of system administrator at Universitas Indonesia. His current interests are in smart card technology, pervasive computing, and free/open source software. He is an evangelist of free/open source movement and using FOSS actively.
  • linhtinh

    and what’s next? after I did as your advice, I try MegaCli command but it says “command not found”

    • http://staff.blog.ui.ac.id/jp/ Jan Peter Alexander Rajagukguk

      You should add /opt/MegaCLI to your PATH or you could go to the directory and run the command there.

      e.g.

      $ export PATH=/opt/MegaCLI:$PATH

      or

      $ cd /opt/MegaCLI

  • http://staff.blog.ui.ac.id/jp/ Jan Peter Alexander Rajagukguk

    Ugh, I mean the MegaRAID directory… sorry

  • http://www.hostingnuggets.com/ Web Hosting

    Very useful post! I just wish one day LSI will create a .deb package, this would simplify our lives…

  • Clive Watts

    http://hwraid.le-vert.net/ubuntu/pool-lucid/

    Enjoy..

    They have been building Debs for a while.. Works perfectly on 11.11 ubuntu

    • http://staff.blog.ui.ac.id/jp/ Jan Peter Alexander Rajagukguk

      Wow, thanks for this valuable information.

  • http://www.unpad.ac.id/fakultas/hukum ARmi

    waw ternyata bisa convert .rpm ke .deb . mau tanya gan, apakah ini efektif dan bisa semua aplikasi ?

    • http://staff.blog.ui.ac.id/jp/ Jan Peter Alexander Rajagukguk

      RPM ke DEB itu agak riskan, karena ketergantungan paketnya bisa jadi berbeda. Kebetulan ini produk tertutup, biasanya dikompilasi statik jadinya tidak perlu ketergantungan yang besar.