From: jim owens <jowens@hp.com>
To: Steve Freitas <sflist@ihonk.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: What protection does btrfs checksumming currently give? (Was Re: btrfs volume mounts and dies (was Re: Segfault in btrfsck))
Date: Thu, 07 Jan 2010 14:29:49 -0500 [thread overview]
Message-ID: <4B46362D.3020102@hp.com> (raw)
In-Reply-To: <1262888912.6214.20.camel@phat>
Steve Freitas wrote:
> Hi all,
>
> I was under the mistaken impression that btrfs checksumming, in its
> current default configuration, protected your data from bitrot. It
> appears this is not the case:
>
> On Wed, 2010-01-06 at 18:24 +0100, Johannes Hirte wrote:
>> Am Mittwoch 06 Januar 2010 16:59:55 schrieb Steve Freitas:
>>> So please correct me if I have some mistaken assumptions. I thought
>>> btrfs would be tolerant of that -- if a block failed the checksum test,
>>> it would reconstruct and remap it.
>
>> Only if enough redundancy is left. And with the default setup btrfs is only
>> mirroring the metadata not the data.
>
> So can someone please tell me what the current state-of-the-art is of
> data protection with btrfs? Does it differ with single-device versus
> multiple-device configurations? Is it possible to enable data
> checksumming now? Under what conditions? And will it do what a naive
> user would expect it to do, namely, correct for diverse kinds of errors
> in your storage subsystem? If not, what does it do? Etc...
First, understand that a checksum only says "this block is good or bad".
The checksum can not be used to "reconstruct" the data.
Checksums are present for all btrfs blocks unless you explicitly shut
them off with mount/ioctl/fcntl options.
To have a good copy you can use as a replacement block, you must
use either btrfs raid1 or raid10. You can use raid1 with 1 drive,
in a mode called "dup" where both copies are made to that device.
By default with 1 drive, btrfs uses "dup" for metadata and 1 copy
(nodup) for file data blocks. To get file data "dup", you just use
"mkfs.btrfs -d raid1".
If you have btrfs raid, it will find the good block on a read, but
AFAIK we don't have tools yet to automatically reallocate the bad one.
jim
next prev parent reply other threads:[~2010-01-07 19:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 23:56 Segfault in btrfsck Steve Freitas
2010-01-03 22:57 ` btrfs volume mounts and dies (was Re: Segfault in btrfsck) Steve Freitas
2010-01-04 0:37 ` Steve Freitas
2010-01-05 22:55 ` Steve Freitas
2010-01-06 7:52 ` Sander
2010-01-06 15:59 ` Steve Freitas
2010-01-06 17:24 ` Johannes Hirte
2010-01-06 20:11 ` Steve Freitas
2010-01-07 8:23 ` Sander
2010-01-07 18:28 ` What protection does btrfs checksumming currently give? (Was Re: btrfs volume mounts and dies (was Re: Segfault in btrfsck)) Steve Freitas
2010-01-07 19:29 ` jim owens [this message]
2010-01-07 21:00 ` Johannes Hirte
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=4B46362D.3020102@hp.com \
--to=jowens@hp.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sflist@ihonk.com \
/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