megacli - Installing megacli on Proxmox

We are going to install the megacli tool on your Proxmox.

The megacli tool is a command line interface that will be used to manage our RAID card and also to provide us statistics of our RAID through scripting.

First, you will need to download the .rpm package.


You can download the tool from here and follow the steps below to install it :

  • Click on "Management Software and Tools"
  • Download the MegaCLI zip file. You will see the same file is for DOS, Windows, Linux and FreeBSD.
  • Unzip the file
  • In the Linux directory there is an RPM. If you are using Redhat you can install it.
  • For Ubuntu got the next step.
  • For Ubuntu run "rpm2cpio MegaCli-*.rpm | cpio -idmv" to expand the directory structure.
  • You may need to "apt-get install rpm2cpio".
  • For FreeBSD unzip the file in the FreeBSD directory.

To install the .deb package execute the below commands :

root@hv2:/home/hv2-ssh# dpkg -i megacli_8.07.14-1_all.deb
Selecting previously unselected package megacli.
(Reading database ... 45813 files and directories currently installed.)
Preparing to unpack megacli_8.07.14-1_all.deb ...
Unpacking megacli (8.07.14-1) ...
Setting up megacli (8.07.14-1) ...
Processing triggers for libc-bin (2.28-10) ...

After the installation the program complained about a missing library that was installed as seen below :

root@hv2:/opt/MegaRAID/MegaCli# ./MegaCli64 
./MegaCli64: error while loading shared libraries: cannot open shared object file: No such file or directory

root@hv2:/opt/MegaRAID/MegaCli# sudo apt-get install libncurses5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
The following NEW packages will be installed:
  libncurses5 libtinfo5

The megacli is now working as expected :

root@hv2:/opt/MegaRAID/MegaCli# ./MegaCli64 
Fatal error - Command Tool invoked with wrong parameters
Exit Code: 0x01

We can now create a linux alias and test with the bellow commands :

alias megacli='/opt/MegaRAID/MegaCli/MegaCli64'

root@hv2:/opt/MegaRAID/MegaCli# megacli -AdpAllInfo -aALL
Adapter #0

Product Name    : LSI MegaRAID SAS 9271-4i
Serial No       : SV42008444
FW Package Build: 23.28.0-0010

Share Tweet Send
You've successfully subscribed to Infoitech - [B]logging
Great! Next, complete checkout for full access to Infoitech - [B]logging
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.