linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Chris Mason <clm@fb.com>,
	kreijack@inwind.it, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [BUG] Btrfs scrub sometime recalculate wrong parity in raid5: take two
Date: Fri, 15 Jul 2016 07:39:10 +0300	[thread overview]
Message-ID: <578868EE.2030108@gmail.com> (raw)
In-Reply-To: <a0538df6-7e25-fae8-8ebd-b18120a1c516@fb.com>

15.07.2016 00:20, Chris Mason пишет:
> 
> 
> On 07/12/2016 05:50 PM, Goffredo Baroncelli wrote:
>> Hi All,
>>
>> I developed a new btrfs command "btrfs insp phy"[1] to further
>> investigate this bug [2]. Using "btrfs insp phy" I developed a script
>> to trigger the bug. The bug is not always triggered, but most of time
>> yes.
>>
>> Basically the script create a raid5 filesystem (using three
>> loop-device on three file called disk[123].img); on this filesystem 

Are those devices themselves on btrfs? Just to avoid any sort of
possible side effects?

>> it is create a file. Then using "btrfs insp phy", the physical
>> placement of the data on the device are computed.
>>
>> First the script checks that the data are the right one (for data1,
>> data2 and parity), then it corrupt the data:
>>
>> test1: the parity is corrupted, then scrub is ran. Then the (data1,
>> data2, parity) data on the disk are checked. This test goes fine all
>> the times
>>
>> test2: data2 is corrupted, then scrub is ran. Then the (data1, data2,
>> parity) data on the disk are checked. This test fail most of the time:
>> the data on the disk is not correct; the parity is wrong. Scrub
>> sometime reports "WARNING: errors detected during scrubbing,
>> corrected" and sometime reports "ERROR: there are uncorrectable
>> errors". But this seems unrelated to the fact that the data is
>> corrupetd or not
>> test3: like test2, but data1 is corrupted. The result are the same as
>> above.
>>
>>
>> test4: data2 is corrupted, the the file is read. The system doesn't
>> return error (the data seems to be fine); but the data2 on the disk is
>> still corrupted.
>>
>>
>> Note: data1, data2, parity are the disk-element of the raid5 stripe-
>>
>> Conclusion:
>>
>> most of the time, it seems that btrfs-raid5 is not capable to rebuild
>> parity and data. Worse the message returned by scrub is incoherent by
>> the status on the disk. The tests didn't fail every time; this
>> complicate the diagnosis. However my script fails most of the time.
> 
> Interesting, thanks for taking the time to write this up.  Is the
> failure specific to scrub?  Or is parity rebuild in general also failing
> in this case?
> 

How do you rebuild parity without scrub as long as all devices appear to
be present?



  reply	other threads:[~2016-07-15  4:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 21:50 [BUG] Btrfs scrub sometime recalculate wrong parity in raid5: take two Goffredo Baroncelli
2016-07-14 21:20 ` Chris Mason
2016-07-15  4:39   ` Andrei Borzenkov [this message]
2016-07-15 13:20     ` Chris Mason
2016-07-15 15:10       ` Andrei Borzenkov
2016-07-15 15:21         ` Chris Mason
2016-07-15 16:30     ` Goffredo Baroncelli
2016-07-15 16:28   ` Goffredo Baroncelli
2016-07-15 16:29     ` Chris Mason
2016-07-15 16:34       ` Andrei Borzenkov
2016-07-16 15:51 ` [BUG] Btrfs scrub sometime recalculate wrong parity in raid5 Jarkko Lavinen
2016-07-17 19:46   ` Jarkko Lavinen
2016-07-18 18:56   ` Goffredo Baroncelli

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=578868EE.2030108@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=clm@fb.com \
    --cc=kreijack@inwind.it \
    --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 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).