All of lore.kernel.org
 help / color / mirror / Atom feed
* RAID 1 not fixing up sector errors?
@ 2016-04-14 13:03 Dag Nygren
  2016-04-14 14:22 ` Andreas Klauer
  2016-04-15  7:56 ` Roman Mamedov
  0 siblings, 2 replies; 5+ messages in thread
From: Dag Nygren @ 2016-04-14 13:03 UTC (permalink / raw)
  To: linux-raid

Hi!

Have set up a RAID1 here for temporary storage of some backup files.
As I am using Seagate barracudas I am prepared for sector errors :-).
that's why I am using RAID1.

Anyway I do get those occasional "Pending Reallocate" with
the appropriate corresponding
Unrecovered read error - auto reallocate failed
in the log.

A resync of the array will rewrite the failing sector 
and the drive seems to reallocate it and all is fine again .

But I was expecting the MD layer to try to fixup that sector
automatically by using the data from the other drive ??

Is there something I need to explicitly enable?
Or am I expecting too much ;-)

Best
Dag



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RAID 1 not fixing up sector errors?
  2016-04-14 13:03 RAID 1 not fixing up sector errors? Dag Nygren
@ 2016-04-14 14:22 ` Andreas Klauer
  2016-04-14 14:43   ` Dag Nygren
  2016-04-15  7:56 ` Roman Mamedov
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Klauer @ 2016-04-14 14:22 UTC (permalink / raw)
  To: Dag Nygren; +Cc: linux-raid

On Thu, Apr 14, 2016 at 04:03:59PM +0300, Dag Nygren wrote:
> Anyway I do get those occasional "Pending Reallocate" with
> the appropriate corresponding
> Unrecovered read error - auto reallocate failed
> in the log.

You should replace such disks. RAID survival depends on healthy disks.
 
> But I was expecting the MD layer to try to fixup that sector
> automatically by using the data from the other drive ??

That should happen if the read error is encountered by the md layer, 
and the disk reports this error properly, and the other disk has data 
and not a bad block at the same place...

However the drive may encounter bad sectors on its own, for example 
early in the boot process before Software RAID is active, or when 
running periodic self-tests or other internal monitoring of the drive.

In such cases the software raid won't know about it.

But you should replace such disks anyhow.

Regards
Andreas Klauer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RAID 1 not fixing up sector errors?
  2016-04-14 14:22 ` Andreas Klauer
@ 2016-04-14 14:43   ` Dag Nygren
  2016-04-14 14:56     ` Andreas Klauer
  0 siblings, 1 reply; 5+ messages in thread
From: Dag Nygren @ 2016-04-14 14:43 UTC (permalink / raw)
  To: Andreas Klauer, linux-raid

On Thursday 14 April 2016 16:22:19 you wrote:
> On Thu, Apr 14, 2016 at 04:03:59PM +0300, Dag Nygren wrote:

> You should replace such disks. RAID survival depends on healthy disks.

I know, but this is very secondary use, no I am really not worried about it.

> > But I was expecting the MD layer to try to fixup that sector
> > automatically by using the data from the other drive ??
> 
> That should happen if the read error is encountered by the md layer, 
> and the disk reports this error properly, and the other disk has data 
> and not a bad block at the same place...

That is what I expected. You can see the proper error from the disk in dmesg
and it is accessed otherwise there would be no dmesg error.

> However the drive may encounter bad sectors on its own, for example 
> early in the boot process before Software RAID is active, or when 
> running periodic self-tests or other internal monitoring of the drive.

Yep, but not the case here.
There is a real access and a real error in the log, but no rewrite...

Should the md layer report anything?

Is there a parameter that might be off?

Best
Dag

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RAID 1 not fixing up sector errors?
  2016-04-14 14:43   ` Dag Nygren
@ 2016-04-14 14:56     ` Andreas Klauer
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Klauer @ 2016-04-14 14:56 UTC (permalink / raw)
  To: Dag Nygren; +Cc: linux-raid

On Thu, Apr 14, 2016 at 05:43:08PM +0300, Dag Nygren wrote:
> There is a real access and a real error in the log, but no rewrite...

I don't think there are log entries for rewrites.

If the rewrite fails, the disk is either kicked directly, 
or it gets an entry in its bad block log.

You could try mdadm --examine and/or --examine-badblocks on your disks 
and show us the output; also the relevant dmesg entries you've seen so 
maybe someone can tell what's going on.

Regards
Andreas Klauer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RAID 1 not fixing up sector errors?
  2016-04-14 13:03 RAID 1 not fixing up sector errors? Dag Nygren
  2016-04-14 14:22 ` Andreas Klauer
@ 2016-04-15  7:56 ` Roman Mamedov
  1 sibling, 0 replies; 5+ messages in thread
From: Roman Mamedov @ 2016-04-15  7:56 UTC (permalink / raw)
  To: Dag Nygren; +Cc: linux-raid

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

On Thu, 14 Apr 2016 16:03:59 +0300
Dag Nygren <dag@newtech.fi> wrote:

> Hi!
> 
> Have set up a RAID1 here for temporary storage of some backup files.
> As I am using Seagate barracudas I am prepared for sector errors :-).
> that's why I am using RAID1.
> 
> Anyway I do get those occasional "Pending Reallocate" with
> the appropriate corresponding
> Unrecovered read error - auto reallocate failed
> in the log.
> 
> A resync of the array will rewrite the failing sector 
> and the drive seems to reallocate it and all is fine again .
> 
> But I was expecting the MD layer to try to fixup that sector
> automatically by using the data from the other drive ??
> 
> Is there something I need to explicitly enable?
> Or am I expecting too much ;-)

I have seen this behavior too. The only somewhat logical explanation that I
have, is that some drives are only able to remap bad sectors if a larger area
around the sector is overwritten, and not just the sector itself. But this is
not scientific or verified.

-- 
With respect,
Roman

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-15  7:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 13:03 RAID 1 not fixing up sector errors? Dag Nygren
2016-04-14 14:22 ` Andreas Klauer
2016-04-14 14:43   ` Dag Nygren
2016-04-14 14:56     ` Andreas Klauer
2016-04-15  7:56 ` Roman Mamedov

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.