安装MegaCli-8.02.21和StorCLI(附安装包)

1、安装包下载

MegaCli-8.02.21下载链接,提取码2fe1
StorCLI下载链接,提取码tgvo

2、MegaCl安装

tar zxf MegaCli8.07.10.tar.gz && cd MegaCli8.07.10/Linux/
rpm -ivh Lib_Utils-1.00-09.noarch.rpm
rpm -ivh MegaCli-8.02.21-1.noarch.rpm
yum install -y libncurses*
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/bin/MegaCli

3、测试

默认安装位置为/opt/MegaRAID/MegaCli

MegaCli -v
MegaCli -PDList -aALL

查看版本

[root@bogon 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

4、StorCLI安装

To install StorCLI, perform the following steps:
1. Unzip the StorCLI package.
2. To install the StorCLI RPM, run the rpm -ivh <StorCLI-x.xx-x.noarch.rpm> command.
3. To upgrade the StorCLI RPM, run the rpm -Uvh <StorCLI-x.xx-x.noarch.rpm> command.

ln -s /opt/MegaRAID/storcli/storcli64 /bin/storcli
ln -s /opt/MegaRAID/storcli/storcli64 /sbin/storcli

5、基本使用

//StorCLI基本使用:
#!/bin/bash
#
set -x
delete_raid() {
    
    
        raid_controller=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Controller"|sed -n "1p"|awk '{print $NF}'`
        raid_disk_num=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Physical Drives"|sed -n "1p"|awk '{print $NF}'`
    for i in `/usr/bin/seq 0 ${
    
    raid_disk_num}`;do /usr/bin/opt/MegaRAID/storcli/storcli64 /c${
    
    raid_controller}/v${
    
    i} del force;done

}
set_raid() {
    
    
        raid_controller=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Controller"|sed -n "1p"|awk '{print $NF}'`
        raid_disk_num=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Physical Drives"|sed -n "1p"|awk '{print $NF}'`
        /usr/bin/opt/MegaRAID/storcli/storcli64 /c0 add vd r1 size=all name=diskarray1 drives=${
    
    raid_controller}:0,${
    
    raid_controller}:1 awb ra cached strip=256
#       /usr/sbin/reboot

}

main() {
    
    
    delete_raid
    set_raid
   #/usr/sbin/reboot
}

# Here we start
main

参考

CentOS 7安装megacli

猜你喜欢

转载自blog.csdn.net/qq_26884501/article/details/112307407