megacli查看服务器磁盘raid信息

1.下载安装MegaCli64
我这里下载的是MegaCli8.07.10.tar.gz

wget https://raw.githubusercontent.com/crazy-zhangcong/tools/master/MegaCli8.07.10.tar.gz

2.解压安装
[root@localhost soft]# tar -xvf MegaCli8.07.10.tar.gz
[root@localhost soft]# cd /soft/MegaCli8.07.10/Linux
[root@localhost soft]# rpm -ivh Lib_Utils-1.00-09.noarch.rpm
[root@localhost soft]# rpm -ivh MegaCli-8.02.21-1.noarch.rpm

3.查看磁盘信息(Primary-5  : raid5)

/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -a0 -Nolog | grep -E "Virtual Drive:|Slot Number:" | xargs | sed -r 's/(Slot Number:)(\s[0-9]+)/\2,/g' | sed 's/(Target Id: .)/Physical Drives ids:/g' | sed 's/Virtual Drive:/\nVirtual Drive:/g'

/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL

 

posted @ 2024-03-15 10:52  随心朝阳  阅读(24)  评论(0编辑  收藏  举报