Step 1: Verify Your Hardware RAID Controller
執行下列指令,可得到 RAID controller 的資訊。
# lspci | grep -i raid 1a:00.0 RAID bus controller: Broadcom / LSI MegaRAID SAS-3 3108 [Invader] (rev 02)
Step 2: Download MegaCLI
下載網址
Support Documents and Downloads[Expand All],找到並下載最後版本的 MegaCLI
unzip 後,到 Linux 的目錄下,執行安裝。並且建立 alias 方便使用
# yum localinstall MegaCli-8.07.14-1.noarch.rpm
# alias megacli='/opt/MegaRAID/MegaCli/MegaCli64'
# ln -sf /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/megacli
# megacli
/opt/MegaRAID/MegaCli/MegaCli64: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
/usr/lib64/libncurses.so.6 /usr/lib64/libncursesw.so.6
/usr/lib64/libncurses.so.6.1 /usr/lib64/libncursesw.so.6.1
經網友指正,執行下列指令,安裝 ncurses-compat-libs,即可解決上述問題
# dnf install ncurses-compat-libs
透過 docker 來執行
那就裝 docker 吧
由於 containerd.io 的版本問題,只能裝較舊的版本
$ sudo dnf install docker-ce-3:18.09.1-3.el7不過在 update 時,必須排除 docker-ce 相關的 package,另外 podman* 會造成衝突也要排除
$ sudo yum update exclude=docker* exclude=podman*
然後裝 docker-compose
$ curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o docker-compose把它加上執行權限,然後移到 /usr/local/bin 的目錄下
然後就可以用 megacli 了
$ docker run --rm -ti --privileged kamermans/docker-megacli
MegaCLI SAS RAID Management Tool Ver 8.07.14 Dec 16, 2013
Storage Command Line Tool Ver 1.03.11 Jan 30, 2013
[root@6873acd250e5 megacli]# megacli -PDList -aALL -Nolog|grep '^Firm'
Firmware state: JBOD
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
[root@6873acd250e5 megacli]#
就這樣子了進一步的使用說明可參考 LSI MegaRAID SAS。
on centos 8, following command fix the "libncurses.so.5:" not found issue.
回覆刪除dnf install -y ncurses-compat-libs.x86_64
謝謝,有空再試試
刪除