服务器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有没有透视方法,微信小程序家乡大贰破解版,模板教程(有挂分析)1、微信小程...
黑科技辅助挂!德普之星透视辅助... 黑科技辅助挂!德普之星透视辅助软件下载,新超圣伏虎,经验教程(有挂教学)黑科技辅助挂!德普之星透视辅...
为了进一步!hhpoker德州... 为了进一步!hhpoker德州真的假的,情怀莆仙外g挂,手段教程(证实有挂)情怀莆仙外g挂破解侠是真...
今日!德州圈脚本,wepoke... 今日!德州圈脚本,wepoker修改工具,模板教程(真的有挂)wepoker修改工具脚本下载中分为三...
2026版软件!微扑克微乐辅助... 2026版软件!微扑克微乐辅助,哥哥打大a外g挂,攻略教程(确实有挂)该软件可以轻松地帮助玩家将哥哥...
现场直击!wepoker透视脚... 现场直击!wepoker透视脚本安卓,途游四川小程序脚本辅助,练习教程(有挂透视);途游四川小程序脚...
据监测!拱趴大菠萝十三水作弊,... 据监测!拱趴大菠萝十三水作弊,小闲辅助软件下载,秘籍教程(有挂解密)该软件可以轻松地帮助玩家将小闲辅...
技巧辅助挂!wepoker透视... 技巧辅助挂!wepoker透视app下载,闲逸510k辅助软件,学习教程(有挂攻略)该软件可以轻松地...
据悉!wepoker透视脚本免... 据悉!wepoker透视脚本免费下载pc,微乐小程序挂哪里有,步骤教程(有挂讲解)1、微乐小程序挂哪...
此事备受玩家关注!wepoke... 此事备受玩家关注!wepoker新号好一点吗,潮友会鱼虾蟹辅助,秘籍教程(讲解有挂)1、潮友会鱼虾蟹...