Skip to content

Instantly share code, notes, and snippets.

@metajiji
Forked from fxkraus/debian-install-megacli.md
Last active July 2, 2024 06:29
Show Gist options
  • Save metajiji/cf859a7fc65a63690ecb208d11ea8407 to your computer and use it in GitHub Desktop.
Save metajiji/cf859a7fc65a63690ecb208d11ea8407 to your computer and use it in GitHub Desktop.
Install LSI MegaCli

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

or

curl -LO https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip

install package

For Debian

cd Linux
sudo alien MegaCli-8.07.14-1.noarch.rpm  # convert from rpm to deb first
sudo dpkg -imegacli_8.07.14-2_all.deb

For CentOS

sudo yum install MegaCli-8.07.14-1.noarch.rpm

Create alternatives

For CentOS

sudo alternatives --install '/usr/bin/MegaCli64' 'MegaCli64' '/opt/MegaRAID/MegaCli/MegaCli64' 1
sudo alternatives --install '/usr/bin/MegaCli' 'MegaCli' '/opt/MegaRAID/MegaCli/MegaCli64' 1
sudo alternatives --install '/usr/bin/megacli' 'megacli' '/opt/MegaRAID/MegaCli/MegaCli64' 1

For Debian

sudo update-alternatives --install '/usr/bin/MegaCli64' 'MegaCli64' '/opt/MegaRAID/MegaCli/MegaCli64' 1
sudo update-alternatives --install '/usr/bin/MegaCli' 'MegaCli' '/opt/MegaRAID/MegaCli/MegaCli64' 1
sudo update-alternatives --install '/usr/bin/megacli' 'megacli' '/opt/MegaRAID/MegaCli/MegaCli64' 1

run MegaCli

/opt/MegaRAID/MegaCli/MegaCli64 -h
MegaCli64 -h
MegaCli -h
megacli -h
@ahmed00medhat
Copy link

Hi All, Can I get help with this error please?

`root@Alpha:~/Linux# megacli XD -VdList

./libstorelibir-2.so: cannot open shared object file: No such file or directory

Internal Error.
ERROR:Could not detect controller.
Failed to get ControllerId List.
Failed to get CpController object.

Exit Code: 0x01`

root@Alpha:~/Linux# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

`root@Alpha:~/Linux# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0 | head

Adapter #0

==============================================================================
Versions
================
Product Name : LSI MegaRAID SAS 9261-8i
Serial No : SV20503315
FW Package Build: 12.15.0-0239
`

@DarkSky7
Copy link

DarkSky7 commented Feb 29, 2024 via email

@FlorianHeigl
Copy link

FlorianHeigl commented Apr 13, 2024

for the record: There's a lot of BS in the ChatGPT answer; i.e. there's no limitation to SATA drives.
Complex tasks honestly still suck in storcli, most basic ones are easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment