安装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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值