Software (mdadm) Raid 6 rebuild problems
I have a Raid6 array built in mdadm, currently running under Ubuntu 11.04, using 7 2tb Sata2 drives. Everything had been running fine for quite a long time. Then one day, a drive reported it had failed, so I changed it with a new one and started to rebuild. I hit a bad sector on a different drive, and it removed it from the array. Some time later in the rebuild it happened again, leaving the array with 4 discs online, 2 removed and 1 partially synced. This is what I'm left with.
johnny@Ubuntu:~$ sudo mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Mon Jan 31 23:19:09 2011
Raid Level : raid6
Used Dev Size : 1953466624 (1862.97 GiB 2000.35 GB)
Raid Devices : 7
Total Devices : 5
Persistence : Superblock is persistent
Update Time : Wed Sep 14 12:39:46 2011
State : active, FAILED, Not Started
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
Name : :Raid6
UUID : f4d0374a:0aaa0563:a6fed9f2:9931a37f
Events : 288197
Number Major Minor RaidDevice State
5 8 81 0 spare rebuilding
1 8 65 1 active sync /dev/sde1
8 8 33 2 active sync /dev/sdc1
3 0 0 3 removed
4 0 0 4 removed
6 8 49 5 active sync /dev/sdd1
7 8 129 6 active sync /dev/sdi1
Notice the 2 discs that are marked as "removed" and the 1 marked "spare rebuilding".
I would understand mdadm removing a disc with bad sectors during a Raid5 rebuild because this would render the array broken, since 1 failed disc and some bad sectors on another disc means you have lost data. But in Raid6 this isn't necessarily the case due to the double parity. Is there a way to keep discs with bad sectors from being removed during a rebuild, forcing the array to rebuild using the remaining parity until the resyncing drive has finished? If so, I could finish rebuilding the new drive and then replace the other two with bad sectors afterward.
1. Can I force the removed discs back into the array?
2. Can I force the removed discs with bad sectors to remain in the array and successfully resync the spare?
Thank you very much ahead of time for any help. Please be detailed in your responses since I'm a novice in all this.
|