/ Debian

MegaCLI

Here some quick notes on how I got MegaCLI for my Symbios Logic MegaRAID SAS 2108 working on Ubuntu 11.10 after coming across a post from yanchar at http://askubuntu.com/questions/112455/megaraid-sas-raid-controller

The problem is that MegaCLI 8.02.21 and older have a bug that prevents it from running on Linux Kernels 3 and above (the output from uname does not seem to be parsed correctly) and you only get an error message like Exit Code: 0x00 or Exit Code: 0x01.

I work as root (su -) but you can also use sudo where needed. First install gcc and libsysfs2

apt-get install gcc libsysfs2

Download a fake uname that will output that you are running a 2.6 kernel and compile it.

wget http://supportex.net/files/fakeuname/fakeuname.c gcc -Wall -fPIC -c fakeuname.c gcc -Wall -shared -o libfakeuname.so fakeuname.o

You can now run MegaCli like this.

LD_PRELOAD=./libfakeuname.so ./MegaCli64 -LDInfo -Lall -Aall

Additional note: I also received the following error message when trying to run it:

OSSpecificInitialize: Failed to load libsysfs.so.2.0.2 Please ensure that libsfs is present in the system.
The dependent library libsysfs.so.2.0.1 not available. Please contact LSI for distribution of the package

This can be easily solved by creating a symlink

ln -s /lib/libsysfs.so.2 /lib/libsysfs.so.2.0.2

LSI acknowledges the bug here, hope they fix it soon.

MegaCLI
Share this