MegaCli repair RAID5

 

Background: IDC site relocation, storage truck pulled up with a new room shelves, a lot of disk itself is broken or Britain is bad on the road, find a repair station for End did not finish the dish machine play ~

Note that the following operations carried out as far as possible in the absence of IO operation conditions.

1, view the status of all disks, which is nothing to say

./MegaCli64 -PDList -a0

2, block disc Firmware state is Unconfigured (bad), which is the goal of today to save

Enclosure Device ID: 0
Slot Number: 9
Device Id: 8
Sequence Number: 7
Media Error Count: 0 Other Error Count: 0 Predictive Failure Count: 0 Last Predictive Failure Event Seq Number: 0 PD Type: SATA Raw Size: 3.638 TB [0x1d1c0beb0 Sectors] Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors] Coerced Size: 3.637 TB [0x1d1b00000 Sectors] Firmware state: Unconfigured(bad) SAS Address(0): 0x5001c4500077d8a9 Connected Port Number: 0(path0) Inquiry Data: 手动马赛克 FDE Capable: Not Capable FDE Enable: Disable Secured: Unsecured Locked: Unlocked Foreign State: None Device Speed: Unknown Link Speed: Unknown Media Type: Hard Disk Device 

3, let this disk becomes good

./MegaCli64 -PDMakeGood -PhysDrv[0:9] -a0

Here -PhysDrv [0: 9] corresponding to the above Enclosure Device ID and Slot Number, -a certainly Adapter # 0, look at the status of the disk

Enclosure Device ID: 0
Slot Number: 9
Device Id: 8
Sequence Number: 8
Media Error Count: 0 Other Error Count: 0 Predictive Failure Count: 0 Last Predictive Failure Event Seq Number: 0 PD Type: SATA Raw Size: 3.638 TB [0x1d1c0beb0 Sectors] Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors] Coerced Size: 3.637 TB [0x1d1b00000 Sectors] Firmware state: Unconfigured(good), Spun Up SAS Address(0): 0x5001c4500077d8a9 Connected Port Number: 0(path0) Inquiry Data: 手动马赛克 FDE Capable: Not Capable FDE Enable: Disable Secured: Unsecured Locked: Unlocked Foreign State: Foreign Foreign Secure: Drive is not secured by a foreign lock key Device Speed: Unknown Link Speed: Unknown Media Type: Hard Disk Device 

4. Now look who lost the original RAID array, that is to replace the bad disk in the original position in the array

./MegaCli64 -pdgetmissing -a0

    Adapter 0 - Missing Physical drives

    No.   Array   Row   Size Expected
    0     1       0     3814912 MB Exit Code: 0x00 

5, is to remember Array 1, Row 0, the following new disc replacement this location

./MegaCli64 -PdReplaceMissing -physdrv[0:9] -array1 -row0 -a0   

Adapter: 0: Missing PD at Array 1, Row 0 is replaced. Exit Code: 0x00 

6, you can see the success, but the RAID can not we just take an empty plate to replace the original bad disk filled with data, the data must first restore job. How to restore? RAID5 can restore the bad disk data by verifying other discs, the recovery process is called Rebuild. The following first Rebuild open up

./MegaCli64 -PDRbld -Start -PhysDrv[0:9] -a0    

Started rebuild progress on device(Encl-0 Slot-9) Exit Code: 0x00 

7, rebuild has begun, this process is very time-consuming, disk IO bring a lot of pressure, so try not to read or write data. I have experienced Rebuild after two days is not good, but the other disk ruining his bad luck. So, there is this empty burn incense to worship a Buddha, the probability of success may be larger. How to know the progress of Rebuild it?

./MegaCli64 -pdrbld -showprog -physdrv[0:9] -a0   

Rebuild Progress on Device at Enclosure 0, Slot 9 Completed 1% in 6 Minutes. Exit Code: 0x00 

This means: already spent six minutes to complete the 1%. . . . According to this rate after about 10 hours to complete

Guess you like

Origin www.cnblogs.com/zhaobin-diray/p/12195116.html
Recommended