megacli通过盘符定位物理盘_MEGACLI查看硬盘状态

通过megacli的如下命令查看RAID的情况,命令如下:

/opt/MegaRAID/MegaCli/MegaCli64 LDPDInfo -Aall

重点关注以下几点:

Media Error Count

Other Error Count

Predictive Failure Count

Last Predictive Failure

Drive has flagged a S.M.A.R.T alert

如果这几个数值不为0,则可能为硬盘故障,需要更换硬盘。

可以通过让指定硬盘闪烁的方式来定位磁盘位置,命令如下:

MegaCli -PdLocate -start -physdrv [E:S] -aALL

其中 E表示 Enclosure Device ID,S表示Slot Number。比如坏盘的位置为:

Enclosure Device ID: 1

Slot Number: 0

可执行以下命令让其闪烁:

root@Storage-c2:/opt/MegaRAID/MegaCli# ./MegaCli64 -PdLocate -start -physdrv[1:0] -a0

Adapter: 0: Device at EnclId-1 SlotId-0 — PD Locate Start Command was successfully sent to Firmware Exit Code: 0x00

root@Storage-c2:/opt/MegaRAID/MegaCli#

更换硬盘后,关闭闪烁的命令如下:

MegaCli -PdLocate -stop -physdrv [E:S] -aALL

如果raid中有硬盘故障,更换硬盘后,一般都无需做操作,阵列卡会自动做rebuild,从拔出硬盘到插入新盘,一般会有以下的过程:

Device

Normal —>Damage —>Rebuild —>Normal

Virtual Drive

Optimal —>Degraded —>Degraded —>Optimal

Physical Drive

Online —>Failed Unconfigured —>Rebuild —>Online

查看rebuild进度的命令如下:

/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -showprog -physDrv [1:0] -a0

输出一般如下:

root@Storage-c2:/opt/MegaRAID/MegaCli# ./MegaCli64 -PDRbld -showprog -physDrv [1:0] -a0

Rebuild Progress on Device at Enclosure 1, Slot 0 Completed 10% in 0 Minutes.

Exit Code: 0x00

root@Storage-c2:/opt/MegaRAID/MegaCli#

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值