MegaCLI 更换预测故障(PFA)硬盘
1. Before physical replacement, perform the following steps
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL # for check the PFA drive status and drive ID [Enclosure ID:Slot Number]./opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [*:*] -a* # for offline the PFA drive, [*:*] is drive ID, a0 is raid adapter ID.
/opt/MegaRAID/MegaCli/MegaCli64 -PDMarkMissing -PhysDrv [*:*] -a* # for set the drive the missing.
/opt/MegaRAID/MegaCli/MegaCli64 -PDPrpRmv -PhysDrv [*:*] -a* # for Prepare remove the drive.
2. Onsite engineer to replace the PFA drive.
3. After physical replacement, perform the following steps
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL # for check new drive status.
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL # for check the raid info./opt/MegaRAID/MegaCli/MegaCli64 -PdReplaceMissing -PhysDrv [*:*] -Array* -row* -a* # for add new drive to raid group.
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -Start -PhysDrv [*:*] -a* # for rebuilding the raid group.
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [*:*] -a* # for monitor the rebuild progress.
If a hot spare has been used, then use the following 2 cmds to replace the above 3 lines (PdReplaceMissing & PDRbld -Start & PDRbld -ShowProg).
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set -PhysDrv[*:*] -a0 #set the new drive to hot spare , then it will automatically to rebuild.
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg –PhysDrv [*:*] -a0 # for check the rebuild progress.