Re: RAID1, changed disk, 2nd has errors ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri Aug 26, 2011 at 01:46:41PM +0200, Stefan G. Weichinger wrote:

> 
> Please help:
> 
> Today I removed a defective hdd out of a RAID1-array and swapped in a
> new hdd instead.
> 
> 3 arrays, to be true, md[012]
> 
> 0 and 1 synced fine, in the process of syncing md2 the old sda threw
> errors (in sda4):
> 
> md/raid1:md2: sda: unrecoverable I/O read error for block 643686144
> md: md2: recovery done.
> 
> [...]
> 
> md/raid1:md2: sda: unrecoverable I/O read error for block 643686272
> 
> ----
> 
> Did the system stop syncing or is "recovery done" the indication that
> md2 was fully recovered BEFORE the system threw sda4 out of the array??
> 
> I hope for the second!
> 
I think it just indicates that it stopped attempting recovery at this
point.

> # cat /proc/mdstat
> Personalities : [raid1]
> md1 : active raid1 sdb3[1] sda3[0]
>       13679232 blocks [2/2] [UU]
> 
> md2 : active raid1 sdb4[2](S) sda4[0]
>       962454080 blocks [2/1] [U_]
> 
> md0 : active raid1 sdb1[1] sda1[0]
>       128384 blocks [2/2] [UU]
> 
This would indicate that sdb has been reset as a spare, suggesting that
the resync failed so it has left sda alone in the array (as failing it
would destroy the array).

I'd suggest stopping the array and using ddrescue to clone sda4
to sdb4. That'll copy everything possible, flagging up any read issues.
You'll then need to run a "fsck -f" on sdb4 to clear up any filesystem
damage. You may still be left with damaged/missing files, depending on
where any read errors occurred. How critical this is will depend on what
the filesystem is used for (and whether you have any backup).

If that all works okay, then get sda replaced and give it a thorough
badblocks and SMART test.

I'd also advise setting up regular array checks (echo check >
/sys/block/mdX/md/sync_action) to make sure the disks are checked and
any unreadable blocks repaired/mapped out _before_ they're needed for
recovery.

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@xxxxxxxxxxxxxxx> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachment: pgp0jXQ5DZkjD.pgp
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux