All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Btrfs scrub failure for raid 6 kernel 4.3
Date: Mon, 28 Dec 2015 02:16:18 +0000 (UTC)	[thread overview]
Message-ID: <pan$ce4e4$679c0a1$8ea944a8$22d67149@cox.net> (raw)
In-Reply-To: 1451266276.6320.31.camel@scientia.net

Christoph Anton Mitterer posted on Mon, 28 Dec 2015 02:31:16 +0100 as
excerpted:

> On Sun, 2015-12-27 at 18:23 -0700, Chris Murphy wrote:
>> I'd want scrub to immediately fail in a degraded case, because the
>> higher workload added by the scrub itself could cause additional device
>> failures sooner. And that would negatively impact the ability to get
>> the array healthy again with a rebuild - during which time you wouldn't
>> want the scrub running anyway.
> I think that should be the default behaviour, yes.
> 
> Probebly there should be a --force like override switch,... again take
> my example of classic RAID1 with say 6 disks... (which is right now not
> possible in btrfs, I know).
> Now one fails... so it's degraded, but you still have 5 left and you're
> probably far away from complete loss. OTOH you still may want to scrub
> your data during during that time (e.g. to catch silent block errors),
> in that specific scenario.

Scrub needs to be able to run on a degraded array (possibly with a 
--force switch, I've no real opinion on that), for a number of reasons:

1) As mentioned up-thread, btrfs scrub isn't like others; we have 
checksums and being able to do a global checksum-verify via scrub, even 
on a degraded array where repair may not be possible, is a legitimate use.

2) With raid6 degraded by loss of only a single device, repair should 
still be possible (and checksums should counteract the partial-stripe-
write hole that parity normally risks, verify the "repair" and don't 
write it if it still fails checksum).

3) With the coming N-way-mirroring, degraded repair from a good copy of 
an N-way-mirrored block down to two-way should be possible, and indeed, 
that'd be the biggest reason to run N-way-mirroring with N>2 in the first 
place.


But regardless, agreed with everyone, simply crashing must be seen as a 
bug.  If it's not going to scrub correctly, it should exit normally but 
with an error status and printout to STDERR, not crash.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  reply	other threads:[~2015-12-28  2:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27 13:59 Btrfs scrub failure for raid 6 kernel 4.3 Waxhead
2015-12-27 18:29 ` Chris Murphy
2015-12-27 23:06   ` Waxhead
2015-12-28  1:48     ` Duncan
2015-12-28  2:04       ` Waxhead
2015-12-28  2:18         ` Chris Murphy
2015-12-28 21:08           ` Waxhead
2015-12-28 21:23             ` Chris Murphy
     [not found]               ` <5681BDD0.1060407@online.no>
2015-12-29  0:29                 ` Chris Murphy
2015-12-29 20:19                   ` Waxhead
2015-12-30  4:22                     ` Chris Murphy
2015-12-30 18:31                       ` Waxhead
2015-12-30 19:08                         ` Waxhead
2015-12-28  4:02         ` Duncan
2015-12-28 21:17           ` Waxhead
2015-12-28 21:50             ` Chris Murphy
2015-12-28  0:39   ` Christoph Anton Mitterer
2015-12-28  0:58     ` Chris Murphy
2015-12-28  1:09       ` Christoph Anton Mitterer
2015-12-28  1:23         ` Chris Murphy
2015-12-28  1:31           ` Christoph Anton Mitterer
2015-12-28  2:16             ` Duncan [this message]
2015-12-28  1:21 ` Duncan

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='pan$ce4e4$679c0a1$8ea944a8$22d67149@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@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.