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 19:39:12 +0000 (UTC) [thread overview]
Message-ID: <pan$43f87$1b04f612$26876f7$5d505a6d@cox.net> (raw)
In-Reply-To: 20140505012719.GD10159@merlins.org
Marc MERLIN posted on Sun, 04 May 2014 18:27:19 -0700 as excerpted:
> The original reason why I was asking myself this question and trying to
> figure out how much better -m raid1 -d raid0 was over -m raid0 -d raid0
>
> I think the summary is that in the first case, you're going to to be
> abel to recover all/most small files (think maildir) if you lose one
> device, whereas in the 2nd case, with half the metadata missing, your FS
> is pretty much fully gone.
> Fair to say that?
Yes. =:^)
> Now, if I don't care about speed, but wouldn't mind recovering a few
> bits should something happen (actually in my case mostly knowing the
> state of the filesystem when a drive was lost so that I can see how many
> new files showed up since my last backup), it sounds like it wouldn't be
> bad to use:
> -m raid1 -d linear
Well, assuming that by -d linear you meant -d single. Btrfs doesn't call
it linear, tho at the data safety level, btrfs single is actually quite
comparable to mdadm linear. =:^)
(I had to check. I knew I didn't remember btrfs having linear as an
option, and hadn't seen any patches float by on the list that would add
it, but since I'm not a dev I don't follow patches /that/ closely, and
thought I might have missed it. So I thought I better go check to see
what this possible new linear option actually was, if indeed I had missed
it. Turns out I didn't miss it after all; there's still no linear option
that I can see, unless it's there and simply not documented. =:^)
> This will not give me the speed boost from raid0 which I don't care
> about, it will give me metadata redundancy, and due to linear, there is
> a decent chance that half my files are intact on the remaining drive
> (depending on their size apparently).
Yes. =:^)
> So one place I use it is not for speed but for one FS that gives me more
> space without redundancy (rotating buffer streaming video from security
> cams).
> At the time I used -m raid1 -d raid0, but it sounds for slightly extra
> recoverability, I should have ued -m raid1 -d linear (and yes, I
> undertand that one should not consider a -d linear recoverable when a
> drive went missing).
That appears to be a very good use of either -d raid0 or -d single, yes.
And since you're apparently not streaming such high resolution video that
you NEED the raid0, single does indeed give you a somewhat better chance
at recovery.
Tho with streaming video I wonder what your filesizes are as video files
tend to be pretty big. If they're over the 1 GiB btrfs data chunk size,
particularly if you're only running a two-device btrfs, you'd probably
lose near all files anyway.
Assuming single data mode and file sizes between a GiB and 2 GiB,
statistically you should lose near 100% on a two device btrfs with one
dropping out, 67% on a three device btrfs with a single device dropout,
50% on four devices, 40% on five devices...
If file sizes are 2-3 GiB, you should lose near 100% on 2-3 devices, 75%
on four devices, 60% on five, 50% on six...
With raid0 data stats would be similar but I believe starting at 16 MiB
with 4 MiB intervals. Due to many files under 16 MiB being stored in the
metadata, you'd lose few of them, but that'd jump to 100% loss at 16 MiB
until you had 5+ devices in the raid0, with 16-20 MiB file loss chance on
a 5-device raid0 80%, since chances would be 80% of one strip of the
stripe being on the lost device. (That's assuming my 4 MiB strip size
assumption is correct, it could be smaller than that, possibly 64 KiB.)
--
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 20:23 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 [this message]
2014-05-05 0:46 ` Daniel Lee
2014-05-05 5:06 ` Marc MERLIN
2014-05-06 17:16 ` Duncan
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$43f87$1b04f612$26876f7$5d505a6d@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).