ちなみに今回は、Medium Errorがたくさんでてるディスクの予防交換。
OSはCent5.4
RAIDカードは、LSI Megaraid 9280 FW:12.12.0-0090
Megacli 8.02.16で。
#まずはHDDの状態を確認。
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0
Enclosure Device ID: 252
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 16
WWN:
Sequence Number: 2
Media Error Count: 67 ← errorはいてる
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Online, Spun Up
Is Commissioned Spare : NO
Device Firmware Level: A5C0
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x4433221100000000
Connected Port Number: 0(path0)
Inquiry Data: MN1220F32HYULDHitachi HDS723020BLA642 MN6OA5C0
・・・省略
#対象のディスクを確認(ランプ点灯)
/opt/MegaRAID/MegaCli/MegaCli64 -Pdlocate start physdrv[252:0] -a0
#対象のディスクを確認(ランプ消灯)
/opt/MegaRAID/MegaCli/MegaCli64 -Pdlocate stop physdrv[252:0] -a0
#対象ディスクのオフライン
/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv[252:0] -a0
Adapter: 0: EnclId-252 SlotId-0 state changed to OffLine.
Exit Code: 0x00
#status確認
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 | less
Adapter #0
Enclosure Device ID: 252
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 16
WWN:
Sequence Number: 3
Media Error Count: 67
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Offline ← offlineになってる。
・・・省略
#対象のディスクにmissing markつける
/opt/MegaRAID/MegaCli/MegaCli64 -PDMarkMissing -PhysDrv[252:0] -a0
EnclId-252 SlotId-0 is marked Missing.
Exit Code: 0x00
#missing markのついたdiskの確認
/opt/MegaRAID/MegaCli/MegaCli64 -PDGetMissing -aALL
Adapter 0 - Missing Physical drives
No. Array Row Size Expected
0 0 0 1907200 MB
#削除前の準備
/opt/MegaRAID/MegaCli/MegaCli64 -PDPrpRmv -PhysDrv[252:0] -a0
Prepare for removal Success
Exit Code: 0x00
#ここでHDDを交換。
#Missing markの状態変更
/opt/MegaRAID/MegaCli/MegaCli64 -PDReplaceMissing -PhysDrv[252:0] -Array0 -row0 -a0
#Rebuildスタート
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -Start -PhysDrv[252:0] -a0
#状態確認
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 | less
^M
Adapter #0
Enclosure Device ID: 252
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 16
WWN:
Sequence Number: 12
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Firmware state: Rebuild ← rebuildのステータスになった
・・・省略
#Rebuildの状況確認
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -showprog -physdrv[252:0] -a0
Rebuild Progress on Device at Enclosure 252, Slot 0 Completed 4% in 11 Minutes.
Exit Code: 0x00
こんな感じでできる。
ただ、PDmarkMissingが対応していない場合があるので注意。