All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Hill <robin.hill47@ntlworld.com>
To: "Stefan G. Weichinger" <lists@xunil.at>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: RAID1, changed disk, 2nd has errors ...
Date: Fri, 26 Aug 2011 13:56:53 +0100	[thread overview]
Message-ID: <20110826125653.GA13709@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <4E5787A1.7080807@xunil.at>

[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]

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@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2011-08-26 12:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 11:46 RAID1, changed disk, 2nd has errors Stefan G. Weichinger
2011-08-26 12:01 ` Mathias Burén
2011-08-26 12:19   ` Stefan G. Weichinger
2011-08-26 12:44     ` Stefan G. Weichinger
2011-08-26 20:00     ` Mathias Burén
2011-08-26 22:12       ` Stefan G. Weichinger
2011-08-26 12:56 ` Robin Hill [this message]
2011-08-26 13:51   ` Stefan G. Weichinger
2011-08-26 14:08     ` Robin Hill
2011-08-26 15:41       ` Stefan G. Weichinger
2011-08-29  7:02         ` Stefan G. Weichinger
2011-08-29  7:45           ` Stefan G. Weichinger
2011-08-29  7:51             ` Mathias Burén
2011-08-29  8:00               ` Stefan G. Weichinger
2011-08-29  8:25                 ` Stefan G. Weichinger
2011-08-29 14:34                   ` (solved) " Stefan G. Weichinger
2011-08-29 23:40                     ` Mathias Burén
2011-08-30 12:14                       ` Stefan G. Weichinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110826125653.GA13709@cthulhu.home.robinhill.me.uk \
    --to=robin.hill47@ntlworld.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=lists@xunil.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.