From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: John Petrini <jpetrini@coredial.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: corruption_errs
Date: Tue, 28 Aug 2018 07:17:59 -0400 [thread overview]
Message-ID: <16e8a484-c271-cabe-e7ba-d9175cf9f96a@gmail.com> (raw)
In-Reply-To: <CAD4AmV76WPVQLEfef1xZ8hmM6n3F0O9Oa9bA4m-RH86iu7u-sg@mail.gmail.com>
On 2018-08-27 18:53, John Petrini wrote:
> Hi List,
>
> I'm seeing corruption errors when running btrfs device stats but I'm
> not sure what that means exactly. I've just completed a full scrub and
> it reported no errors. I'm hoping someone here can enlighten me.
> Thanks!
The first thing to understand here is that the error counters reported
by `btrfs device stats` are cumulative. In other words, they count
errors since the last time they were reset (which means that if you've
never run `btrfs device stats -z` on this filesystem, then they will
count errors since the filesystem was created). As a result, seeing a
non-zero value there just means that errors of that type happened at
some point in time since they were reset.
Building on this a bit further, corruption errors are checksum
mismatches. Each time a block is read and it's checksum does not match
the stored checksum for it, a corruption error is recorded. The thing
is though, if you are using a profile which can rebuild that block (dup,
raid1, raid10, or one of the parity profiles), the error gets corrected
automatically by the filesystem (it will attempt to rebuild that block,
then write out the correct block). If that fix succeeds, there will be
no errors there anymore, but the record of the error stays around
(because there _was_ an error).
Given this, my guess is that you _had_ checksum mismatches somewhere,
but they were fixed before you ran scrub.
prev parent reply other threads:[~2018-08-28 15:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 22:53 corruption_errs John Petrini
2018-08-28 11:17 ` Austin S. Hemmelgarn [this message]
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=16e8a484-c271-cabe-e7ba-d9175cf9f96a@gmail.com \
--to=ahferroin7@gmail.com \
--cc=jpetrini@coredial.com \
--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).