From: Chris Murphy <lists@colorremedies.com>
To: Russell Coker <russell@coker.com.au>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Questions on use of NOCOW impact to subvolumes and snapshots
Date: Thu, 20 Aug 2015 10:44:12 -0600 [thread overview]
Message-ID: <CAJCQCtSf=ZK4Avu4nPeBWaDgbHv1xUzegvhfAGbLcBFGrLSM1g@mail.gmail.com> (raw)
In-Reply-To: <201508201343.07618.russell@coker.com.au>
On Wed, Aug 19, 2015 at 9:43 PM, Russell Coker <russell@coker.com.au> wrote:
> On Thu, 20 Aug 2015 11:55:43 AM Chris Murphy wrote:
>> > Question 1: If I apply the NOCOW attribute to a file or directory, how
>> > does that affect my ability to run btrfs scrub?
>>
>> nodatacow includes nodatasum and no compression. So it means these
>> files are presently immune from scrub check and repair so long as it's
>> based on checksums. I don't know if raid56 scrub compares to parity
>> and recomputes parity (assumes data is correct), absent checksums,
>> which would be similar to how md raid 56 does it.
>
> Linux Software RAID could recreate a mismatched block from RAID-6 parity but
> doesn't do so. It could be that a block was changed correctly but didn't get
> the parity data written so such "correction" would be reverting a change. So
> Linux Software RAID only regenerates parity for a scrub and makes both disks
> have the same data for RAID-1.
https://www.kernel.org/pub/linux/kernel/people/hpa/raid6.pdf
Discussion starts in section 4 on page 7. The relevant part I'm
confused about is on page 8, " once the faulty drive has been
identified" doesn't clarify a mechanism to determine which data drive
is corrupt. Iti seems without that knowledge, it's not possible to
reconstruct. Further, should there be two corruptions, however
unlikely, reconstruction causes a third corruption. So it's a bit
risky.
In any case though, in normal operation, md raid6 isn't checking
parity. It always assumes the data chunks are valid unless the drive
itself returns a read error. For scrub repair, it assumes data is
correct and writes new parity, which is different than with a raid1
scrub repair where there's something of a random (?) assumption which
mirrored chunk is correct and the other(s) are overwritten. I don't
even know that with n-way mirroring this scrub assumes majority rules.
--
Chris Murphy
next prev parent reply other threads:[~2015-08-20 16:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 0:44 Questions on use of NOCOW impact to subvolumes and snapshots Jonathan Panozzo
2015-08-20 1:55 ` Chris Murphy
2015-08-20 3:43 ` Russell Coker
2015-08-20 16:44 ` Chris Murphy [this message]
2015-08-20 17:31 ` Austin S Hemmelgarn
2015-08-20 4:09 ` Zhao Lei
2015-08-20 4:40 ` Jonathan Panozzo
2015-08-20 6:03 ` Zhao Lei
2015-08-20 6:13 ` Jonathan Panozzo
2015-08-20 6:31 ` Zhao Lei
2015-08-20 12:09 ` Austin S Hemmelgarn
2015-08-21 3:34 ` Russell Coker
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='CAJCQCtSf=ZK4Avu4nPeBWaDgbHv1xUzegvhfAGbLcBFGrLSM1g@mail.gmail.com' \
--to=lists@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=russell@coker.com.au \
/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;
as well as URLs for NNTP newsgroup(s).