Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Mukund Sivaraman <muks@banu.com>
To: linux-raid@vger.kernel.org
Subject: RAID-6 recovery questions
Date: Fri, 27 Jan 2012 13:40:25 +0530	[thread overview]
Message-ID: <20120127081025.GA22388@jurassic> (raw)

Hi all

I am interested in building a 3TB * 8 disk RAID-6 array for
personal use. I am looking for info related to md recovery in the case
of failure.

I want to rely on the md RAID-6 array to some extent. It is a large
capacity array, and it is not financially feasible for me to have an
external mirror of it.

It seems that distributions like Fedora have a raid-check script for
periodic patrol read check, which is bound to reduce the risk of
surprise read errors during recovery.

In the unlikely case of 2 disk failure, a RAID-6 array loses redundancy,
but the array is still available.

When a disk reports errors reading blocks, it's likely that the rest of
the disk is readable, save for the bad blocks. In large capacity disks
available today, bad blocks are very common (as SMART output on year-old
disks will show). (Rewriting these bad blocks should make the disk remap
them and make them available again.)

My questions:

1. During recovery after 1-disk failure, what happens if there are
read errors on more than one disk? From what I've understood it seems
that if there is a read error during recovery, the entire disk is marked
as failed. It's very probable that these bad blocks are in different
places on different disks. Is it mathematically possible (RAID-6) to
recover such an array completely (rewriting the bad blocks with data
from other disks)? What options are available to recover from such a
situation?

Figure:

+---+---+---+---+---+---+---+---+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |  RAID-6 array
+---+---+---+---+---+---+---+---+
  ^   ^   ^  \---------v-------/
  |   |   |           ok
dead  |   |
      |   +- partial read errors
      +----- partial read errors

{read_error_blocks(3)} intersect {read_error_blocks(2)} = NUL.


2. During recovery after 2-disk failure, what happens if there are
read errors?  Is it possible to overwrite the bad blocks with zeros (so
they are remapped and don't error anymore) and force them back into the
same array configuration so that most of the filesystem can be recovered
(except for the data in the bad blocks) ?

3. What is the raid6check(8) tool useful for, which checks non-degraded
arrays?  Doesn't "echo check > /sys/block/$dev/md/sync_action" do the
same?


Kind regards,

Mukund

             reply	other threads:[~2012-01-27  8:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27  8:10 Mukund Sivaraman [this message]
2012-01-27 12:30 ` RAID-6 recovery questions Mathias Burén
2012-01-29 13:06   ` Mukund Sivaraman
2012-01-27 17:56 ` Piergiorgio Sartor
2012-01-29 13:07   ` Mukund Sivaraman

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=20120127081025.GA22388@jurassic \
    --to=muks@banu.com \
    --cc=linux-raid@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox