服务器RAID管理之MegaRaid工具
创始人
2025-01-17 16:03:30
0

一、简介

   MegaCli是一款管理维护硬件RAID软件,可以通过它来了解当前raid卡的所有信息,包括 raid卡的型号,raid的阵列类型,raid 上各磁盘状态等等。通常,我们对硬盘当前的状态不太好确定,一般通过机房人员巡检来完成,而MegaCli可以轻松通过远程完成硬盘类巡检。

   一般通过 MegaCli 巡检到的Media Error Count: 0 Other Error Count: 0 这两个数值来确定阵列中磁盘是否有问题;Medai Error Count 表示磁盘可能错误,可能是磁盘有坏道,这个值不为0值得注意,数值越大,危险系数越高,Other Error Count 表示磁盘可能存在松动,可能需要重新再插入。

二、安装

LINUX版安装如下:

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
uzip 8-07-14_MegaCLI.zip
rpm -ivh MegaCli-8.07.14-1.noarch.rpm

三、运维高频使用

【1】查raid级别、显示所有逻辑磁盘组信息
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL

【2】查raid卡信息 (可以查看raid卡时间,raid卡时间和系统时间可能不一致,raid卡日志用的是raid卡时间)
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL

【3】查看硬盘信息 (查看磁盘有无坏道:Media Error Count )
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL

【4】查看raid卡日志
/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL

【5】显示Raid卡型号,Raid设置,Disk相关信息
/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL

【6】查看虚拟磁盘信息
/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL |grep -E "Target Id|Slot Number|Firmware state"
Megacli查看硬盘状态,盘笼ID,slot以及是否是热备盘:
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL | grep -E "^Enclosure Device|^Slot|^Raw|^Firmware|^Comm"

【7】在线添加磁盘
/opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0

【8】创建阵列,不指定热备
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0

【9】创建一个 raid5 阵列,由物理盘 2,3,4 构成,指定阵列的热备盘是物理盘5
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] -a0

【10】指定第 5 块盘作为全局热备
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0

【11】指定第 5 块盘为某个阵列的专用热备
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0

【12】删除全局热备
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Rmv -PhysDrv[8:11] -a0

【13】删除阵列
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -a1

【14】将某块物理盘下线
/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [1:4] -a0

【15】将某块物理盘上线
/opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv [1:4] -a0

【16】清除所有的raid组的配置
/opt/MegaRAID/MegaCli/MegaCli64  -cfgclr  -a0      清除所有的raid组的配置
/opt/MegaRAID/MegaCli/MegaCli64  -cfglddel  -L1 -a0  删除指定的raid组(Target Id: 0)的raid组,可以通过上面的“查看逻辑盘详细信息”得到。

【17】让硬盘LED灯闪烁
/opt/MegaRAID/MegaCli/MegaCli64 -PdLocate -start –physdrv[252:0] -a0 

相关内容

热门资讯

透视透视!wepoker辅助器... 透视透视!wepoker辅助器安装包(wepoker底牌透视)辅助器下载(总是有挂)所有人都在同一条...
透视美元局!wepoker是不... 透视美元局!wepoker是不是有人用挂,(WEPOKER破解)都是是真的有挂(详细辅助器)1、构建...
透视计算!wpk私人局辅助是真... 透视计算!wpk私人局辅助是真的吗,(WPK方法)都是存在有挂(详细显示有作弊)1.wpk私人局辅助...
资料辅助挂!aapoker透视... 资料辅助挂!aapoker透视脚本下载(aapOKER)aapoker透视方法(好像是真的有挂)1、...
透视了解!wepoker免费透... 透视了解!wepoker免费透视脚本(WEPOKER下载)外挂(好像真的是有挂)1、完成wepoke...
透视攻略!wpk是真的还是假的... 透视攻略!wpk是真的还是假的,(wPk方法)插件(果然是真的有挂)一、wpk是真的还是假的AI软件...
透视数据!wepoker到底有... 透视数据!wepoker到底有没有透视,wepoker辅助器如何使用(透视都是是真的有挂)1、不需要...
绝活儿辅助挂!aapoker辅... 绝活儿辅助挂!aapoker辅助器怎么用(aapokER)aapoker俱乐部靠谱吗(一直存在有挂)...
透视线上"we-po... 透视线上"we-poker辅助(底牌透视脚本)wepoker透视底牌"果然真的有挂;1、wepoke...
透视肯定!wpk辅助软件,(w... 透视肯定!wpk辅助软件,(wpK德州局)真是有挂(详细俱乐部辅助器)1、wpk辅助软件系统规律教程...