Skip to contentSkip to conversation

RAID 1 not fixing up sector errors?

DISCUSSION Dag Nygren 3 participants 5 messages Apr 14, 2016 – Apr 15, 2016 MD RAID

lore
Share & tools
lore

Dag Nygren

author
#0 lore raw

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

#1 lore raw
Quoted 4 lines · Dag Nygren

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.

Quoted 2 lines

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

author
#2 lore raw
Quoted 3 lines · 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.

Quoted 6 lines
Quoted 2 lines

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.

Quoted 3 lines

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

#3 lore raw
Quoted 1 line · Dag Nygren

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

#4 lore raw
In reply to Dag Nygren
Quoted 11 lines · On Thu, 14 Apr 2016 16:03:59 +0300 Dag Nygren <[email protected]> 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.

Quoted 8 lines

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.

Signature · 2 lines
With respect,
Roman