From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Is metadata redundant over more than one drive with raid0 too?
Date: Tue, 6 May 2014 17:16:08 +0000 (UTC) [thread overview]
Message-ID: <pan$a6ac4$b6e79aa$56ddd950$5b7b75c2@cox.net> (raw)
In-Reply-To: 20140505050617.GG10159@merlins.org
Marc MERLIN posted on Sun, 04 May 2014 22:06:17 -0700 as excerpted:
> That's true, but in this case I barely see the point of -m single vs -m
> raid0. It sounds like they both stripe data anyway, maybe not at the
> same level, but if both are striped, than they're almost the same in my
> book :)
Single only stripes in such extremely large (1 GiB data, quarter-GiB
metadata, per strip) chunks that it doesn't matter for speed, and then
only as a result of its chunk allocation policy. If one can define such
large strips as striping, which it is in a way, but not really in the
practical sense.
The effect of a lost device, then, is more or less random, tho for single
metadata the effect is likely to be quite large up to total loss, due to
the damage to the tree. It's not out of thin air that the multi-device
metadata default is raid1 (which unlike the single-device case, should be
the same on SSD or spinning rust, since by definition the copies will be
on different devices and thus cannot be affected by SSDs' FTL-level de-
dup).
So the below assumes copies=2 raid1 metadata and is thus only considering
single vs. raid0 data.
For single data, only files that happened to be partially allocated on
the lost device will be damaged. For file sizes above the 1 GiB data
chunk size, the chance of damage is therefore rather high, as by
definition the file will require multiple chunks and the chances of one
of them being on the lost device go up accordingly. But for file sizes
significantly under 1 GiB, where data fragmentation is relatively low at
least (think a recent rebalance or (auto)defrag), relatively small files
are very likely to be located on a single chunk and thus either all there
or all missing, depending on whether that chunk was on the missing device
or not.
That contrasts with raid0, where the striping is at sizes well under a
chunk (memory page size or 4 MiB on x86/amd64 data I believe, tho the
fact that files under the 16 MiB node size may actually be entirely
folded into metadata and not have a data extent allocation at all skews
things for up to the 16 MiB metadata node size), so the definition of
"small file likely to be recovered" is **MUCH** smaller on raid0, than on
single.
Effectively, raid0 data you're only (relatively) likely to recover files
smaller than 16 MiB, while single data, it's files smaller than 1 GiB.
Big difference!
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2014-05-06 19:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-03 23:27 Is metadata redundant over more than one drive with raid0 too? Marc MERLIN
2014-05-04 6:57 ` Brendan Hide
2014-05-04 7:24 ` Marc MERLIN
2014-05-04 7:44 ` Brendan Hide
2014-05-05 1:27 ` Marc MERLIN
2014-05-06 19:05 ` Duncan
2014-05-06 19:39 ` Duncan
2014-05-05 0:46 ` Daniel Lee
2014-05-05 5:06 ` Marc MERLIN
2014-05-06 17:16 ` Duncan [this message]
2014-05-07 8:18 ` raid0 vs single, and should we allow -mdup by default on SSDs? Marc MERLIN
2014-05-07 8:29 ` Hugo Mills
2014-05-07 8:52 ` Marc MERLIN
2014-05-07 22:39 ` Mitch Harder
2014-05-04 21:49 ` Is metadata redundant over more than one drive with raid0 too? Duncan
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='pan$a6ac4$b6e79aa$56ddd950$5b7b75c2@cox.net' \
--to=1i5t5.duncan@cox.net \
--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).