首先说下自己遇到的坑:
百度搜索了一篇关于安装 MegaCli 的文章,于是乎就开始安装,装完之后获取不到 raid 的信息,后来发现是版本问题,就又搜索了一堆文章,最后搞定了
[root@web-01_zw_119 install]# /opt/MegaRAID/MegaCli/MegaCli64 -v MegaCLI SAS RAID Management Tool Ver 1.01.39 Aug 01, 2007 (c)Copyright 2007, LSI Logic Corporation, All Rights Reserved.
由于在做 CMDB 需要统计服务器的硬盘raid信息,需要使用该软件可以获取到服务器的raid信息以便方便进行资产统计
1、系统环境
服务器: [root@web-01_zw_119 ~]# dmidecode -t1 | egrep "Manufacturer|Product Name" Manufacturer: Dell Inc. Product Name: PowerEdge R630 系统: [root@web-01_zw_119 ~]# cat /etc/redhat-release CentOS release 6.7 (Final) [root@web-01_zw_119 ~]# uname -r 2.6.32-573.18.1.el6.x86_64
2、下载安装包
下载地址:https://raw.githubusercontent.com/crazy-zhangcong/tools/master/MegaCli8.07.10.tar.gz
3、安装软件包
[root@web-01_zw_119 install]# tar -zxf MegaCli8.07.10.tar.gz [root@web-01_zw_119 install]# tree MegaCli8.07.10 MegaCli8.07.10 ├── Linux │ ├── Lib_Utils-1.00-09.noarch.rpm # 需要安装这两个 rpm 包 │ ├── MegaCli-8.02.21-1.noarch.rpm │ ├── readme.txt │ └── Run-Linux-PERC.sh └── WINDOWS ├── MegaCli64.exe ├── MegaCli.exe ├── readme.txt ├── X64.bat └── X86.bat [root@web-01_zw_119 install]# cd MegaCli8.07.10/Linux/ [root@web-01_zw_119 Linux]# rpm -ivh Lib_Utils-1.00-09.noarch.rpm [root@web-01_zw_119 Linux]# rpm -ivh MegaCli-8.02.21-1.noarch.rpm [root@web-01_zw_119 Linux]# ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/bin/MegaCli [root@web-01_zw_119 Linux]# MegaCli -v MegaCLI SAS RAID Management Tool Ver 8.02.21 Oct 21, 2011 (c)Copyright 2011, LSI Corporation, All Rights Reserved. Exit Code: 0x00