Install LSI MegaCli package on Debian/Ubuntu/RedHat and Create 2 groups RAID5 for OVH Servers to use maximum disk space
Send your server to rescue mode, If you use rescue custom mode then you probably need to install megacli
Then you can, When your server reboots, log in to it via SSH using the rescue mode credentials that were emailed to you.
Install LSI MegaCli package on Linux - All distributions based on RedHat/Debian:
apt-get install unzip
apt-get install alien
apt install libncurses5
When trying to run MegaCli on a 64-bit Debian/Ubuntu 24.04 system, you may encounter the following error:
MegaCli: error while loading shared libraries: libncurses.so.5: cannot open shared object file
This error occurs because the 64-bit system is missing the required 32-bit libraries.
Solution:
To resolve this issue, you need to create a symlink for the missing library. Follow these steps:
-
Check if the library exists: Before creating the symlink, make sure that the library libncurses.so.5 is installed on your system. You can check this by locating the library in /usr/lib/x86_64-linux-gnu/ or /lib/x86_64-linux-gnu/.
-
Create the symlink: If the library exists but the error persists, the issue might be due to the system looking for the library in a different path. Create a symbolic link to resolve this:
ln -s /usr/lib/x86_64-linux-gnu/libncurses.so.5 /usr/lib/x86_64-linux-gnu/libncurses.so.5
ln -s /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.6
- Verify the solution: After creating the symlink, try running MegaCli again to check if the error is resolved. You should see something similar to the following if it works:
/opt/MegaRAID/MegaCli/MegaCli64 -v
MegaCLI SAS RAID Management Tool Ver 8.07.14 Dec 16, 2013
(c)Copyright 2013, LSI Corporation, All Rights Reserved.
Exit Code: 0x00
- If you are consistently working with legacy software requiring 32-bit libraries, consider installing the full set of 32-bit compatibility libraries with:
sudo apt-get install ia32-libs
wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
unzip 8-07-14_MegaCLI.zip
cd Linux
sudo alien MegaCli-8.07.14-1.noarch.rpm
sudo dpkg -i megacli_8.07.14-2_all.deb
/opt/MegaRAID/MegaCli/MegaCli64 -h
alias MegaCli='/opt/MegaRAID/MegaCli/MegaCli64'
MegaCli -h
unzip 8-07-14_MegaCLI.zip
cd Linux
yum localinstall MegaCli-8.07.14-1.noarch.rpm
From the command line, type the following commands to delete the existing RAID settings. All data in the RAID will be deleted
MegaCli -CfgLdDel -L0 -a0
MegaCli -CfgLdDel -Lall -aAll
MegaCli -PdList -aALL | egrep "Slot|Device ID"
MegaCli -CfgLDAdd -R0[252:0,252:1] -a0
In this example, 252 is the ID of the drive enclosure.
MegaCli -CfgLdAdd -r5 [252:0,252:1,252:2,252:3,252:4,252:5] -a0
MegaCli -CfgLdAdd -r5 [252:6,252:7,252:8,252:9,252:10,252:11] -a0
MegaCli -LDInfo -Lall -a0 | grep -i size
Now just start your server in normal mode and you will be able to see your disk groups.