利用megacli处理阵列故障

#检查阵列状态
megacli -LDInfo -Lall -aALL | grep State
#检查硬盘状态
megacli -PDList -aALL|grep 'Firmware state'
megacli -PDList -aALL | grep -e '^$' -e Slot -e Count -e Enclosure -e 'Device Id' -e WWN -e 'Inquiry Data'
#关闭报警beep
megacli -AdpSetProp -AlarmSilence -aALL
 
# Blink the LED on drive
# to start
megacli -PdLocate -start -physdrv[Enclosure:Slot] -aALL
# to stop
megacli -PdLocate -stop -physdrv[Enclosure:Slot] -aALL
 
# Take the disk offline:
megacli -PDOffline -PhysDrv '[Enclosure:Slot]' -a0
# Mark the disk as missing:
megacli -PDMarkMissing -PhysDrv '[Enclosure:Slot]' -a0
# Prepare the disk for removal:
megacli -PDPrpRmv -PhysDrv '[Enclosure:Slot]' -a0

Now you should replace the defective this!

megacli -PDList -aALL | grep "Firmware state"
 
输出:
Firmware state: Rebuild
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up

利用smartctl检查磁盘状态:

# smartctl -a -d megaraid,devide_id -H device_in_linux
smartctl -a -d megaraid,2 -H /dev/sda

REFERENCE

  • hardware/lsi/megacli处理阵列故障.txt
  • 最后更改: 2019/04/16 18:31
  • (外部编辑)