From: NeilBrown <neilb@suse.com>
To: David Brown <david.brown@hesbynett.no>, linux-raid@vger.kernel.org
Subject: Re: Multi-layer raid status
Date: Fri, 02 Feb 2018 17:03:34 +1100 [thread overview]
Message-ID: <87372k2aix.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <5A708F8E.2040604@hesbynett.no>
[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]
On Tue, Jan 30 2018, David Brown wrote:
> Does anyone know the current state of multi-layer raid (in the Linux md
> layer) for recovery?
>
> I am thinking of a setup like this (hypothetical example - it is not a
> real setup):
>
> md0 = sda + sdb, raid1
> md1 = sdc + sdd, raid1
> md2 = sde + sdf, raid1
> md3 = sdg + sdh, raid1
>
> md4 = md0 + md1 + md2 + md3, raid5
>
>
> If you have an error reading a sector in sda, the raid1 pair finds the
> mirror copy on sdb, re-writes the data to sda (which re-locates the bad
> sector) and passes the good data on to the raid5 layer. Everyone is
> happy, and the error is corrected quickly.
>
> Rebuilds are fast as single disk copies.
>
>
> However, if you have an error reading a sector in sda /and/ when reading
> the mirror copy in sdb, then the raid1 pair has no data to give to the
> raid5 layer. The raid5 layer will then read the rest of the stripe and
> calculate the missing data. I presume it will then re-write the
> calculated data to md0, which will in turn write it to sda and sdb, and
> all will be well again.
If sda and sdb have bad-block-logs configured, this should work. Not
everyone trusts them though.
>
>
> But what about rebuilds? A rebuild or recovery of the raid1 layer is
> not triggered by a read from the raid5 level - it will be handled at the
> raid1 level. If sda is replaced, then the raid1 level will build it by
> copying from sdb. If a read error is encountered while copying, is
> there any way for the recovery code to know that it can get the missing
> data by asking the raid5 level? Is it possible to mark the matching sda
> sector as bad, so that a future raid5 read (such as from a scrub) will
> see that md0 stripe as bad, and re-write it?
>
"Is it possible to mark the matching sda sector as bad"
This is exactly what the bad-block-list functionality is meant to do.
NeilBrown
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-02-02 6:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 15:30 Multi-layer raid status David Brown
2018-02-02 6:03 ` NeilBrown [this message]
2018-02-02 10:41 ` David Brown
2018-02-02 11:17 ` Wols Lists
2018-02-02 11:32 ` David Brown
2018-02-02 12:12 ` Reindl Harald
2018-02-02 14:24 ` Wols Lists
2018-02-02 14:50 ` David Brown
2018-02-02 15:03 ` Wols Lists
2018-02-02 15:40 ` David Brown
2018-02-02 16:49 ` Wols Lists
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=87372k2aix.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=david.brown@hesbynett.no \
--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 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.