Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Zygo Blaxell <zblaxell@furryterror.org>
To: Hugo Mills <hugo@carfax.org.uk>,
	Tomasz Torcz <tomek@pipebreaker.pl>,
	linux-btrfs@vger.kernel.org
Subject: Re: unexplainable corruptions 3.17.0
Date: Mon, 20 Oct 2014 10:04:37 -0400	[thread overview]
Message-ID: <20141020140437.GC29401@hungrycats.org> (raw)
In-Reply-To: <20141017081737.GC29594@carfax.org.uk>

[-- Attachment #1: Type: text/plain, Size: 2249 bytes --]

On Fri, Oct 17, 2014 at 08:17:37AM +0000, Hugo Mills wrote: > On Fri, Oct 17, 2014 at 10:10:09AM +0200, Tomasz Torcz wrote:
> > On Fri, Oct 17, 2014 at 04:02:03PM +0800, Liu Bo wrote:
> > > >   Recently I've observed some corruptions to systemd's journal
> > > > files which are somewhat puzzling. This is especially worrying
> > > > as this is btrfs raid1 setup and I expected auto-healing.
> > > > 
> > > >   System details: 3.17.0-301.fc21.x86_64
> > > > btrfs: raid1 over 2x dm-crypted 6TB HDDs.
> > > > mount opts: rw,relatime,seclabel,compress=lzo,space_cache
> > > >   Reads with cat, hexdump fails with:
> > > > read(4, 0x1001000, 65536)               = -1 EIO (Input/output error)
> > > > 
> > > Does scrub work for you?
> > 
> >   As there seem to be no way to scrub individual files, I've started
> > scrub of full volume.  It will take some hours to finish.
> > 
> >   Meanwhile, could you satisfy my curiosity what would scrub do that
> > wouldn't be done by just reading the whole file?
> 
>    It checks both copies. Reading the file will only read one of the
> copies of any given block (so if that's good and the other copy is
> bad, it won't fix anything).

Really?  One of my earliest btrfs tests was to run a loop of 'sha1sum
-c' on a gigabyte or two of files in one window while I used dd to
write random data in random locations directly to one of the filesystem
mirror partitions in the other.  I did this test *specifically* to
watch the automatic checksumming and self-healing features of btrfs
in action.  A complete 'sha1sum' verification of the filesystem contents
passed even though the kernel log was showing checksum errors scrolling
by faster than I could read, which strongly implies that read() normally
does check both mirrors before returning EIO.  This was on kernel version
3.12.21 or so, so it should be working on 3.17 too.

Thomasz reports using 'nocow', which breaks the data integrity checks.
I'd expect the read() to return success and provide garbage data, but the
observed behavior is EIO instead.  The underlying device doesn't seem
to be generating the I/O errors, so it's probably metadata corruption
of some kind.  Are there btrfs kernel messages in dmesg?


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2014-10-20 14:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16  9:17 unexplainable corruptions 3.17.0 Tomasz Torcz
2014-10-17  8:02 ` Liu Bo
2014-10-17  8:10   ` Tomasz Torcz
2014-10-17  8:17     ` Hugo Mills
2014-10-20 14:04       ` Zygo Blaxell [this message]
2014-10-20 14:52         ` Rich Freeman
2014-10-17  8:29     ` Liu Bo
2014-10-17  8:54       ` Tomasz Torcz
2014-10-17 12:53         ` Chris Mason
2014-10-17 18:09           ` Rich Freeman
2014-10-18  7:32             ` Chris Samuel
2014-10-19  3:01               ` Chris Samuel
2014-10-20  8:01               ` Marc Dietrich
2014-10-20  9:14                 ` Chris Samuel
2014-10-20 19:09           ` Tomasz Torcz
2014-10-17 11:38   ` Duncan
2014-10-17 15:07     ` Chris Murphy
2014-10-17 17:29   ` Tomasz Torcz
2014-10-17  8:17 ` Marc Dietrich
2014-10-17 15:01 ` Chris Murphy
2014-10-20 19:10   ` Tomasz Torcz

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=20141020140437.GC29401@hungrycats.org \
    --to=zblaxell@furryterror.org \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tomek@pipebreaker.pl \
    /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