megacli修复raid1硬盘
使用megaraid修复raid1掉线硬盘
使用说明:
查看硬盘状态
~# megacli -PDList -aAll -NoLog | grep 'Firmware state'
Firmware state: Unconfigured(bad)
Firmware state: Online, Spun Up
将Unconfigured(bad)
调整为可用的good
状态
~# megacli -PDMakeGood -PhysDrv[252:0] -a0
~# megacli -PDList -aAll -NoLog | grep 'Firmware state'
Firmware state: Unconfigured(good), Spun Up
Firmware state: Online, Spun Up
检查掉线硬盘
~# megacli -pdgetmissing -a0
Adapter 0 - Missing Physical drives
No. Array Row Size Expected
0 0 1 952720 MB
重新导入raid配置,掉线硬盘进入Rebuild
~# megacli -CfgForeign -Import -a0
~# megacli -PDList -aAll -NoLog | grep 'Firmware state'
Firmware state: Rebuild
Firmware state: Online, Spun Up
~# megacli -PDRbld -ShowProg -PhysDrv[252:0] -aAll
Rebuild Progress on Device at Enclosure 252, Slot 0 Completed 4% in 4 Minutes.
Exit Code: 0x00
Rebuild后硬盘恢复在线
大专栏 HKL's Bloge">
~# megacli -PDList -a0 |grep "Firmware state"
Firmware state: Online, Spun Up
Firmware state: Online, Spun Up