From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Incremental backup for a raid1
Date: Fri, 14 Mar 2014 06:42:27 +0000 (UTC) [thread overview]
Message-ID: <pan$60e7c$45de97e1$2fb9daeb$288befdc@cox.net> (raw)
In-Reply-To: 1564384.fRV1HUkfCq@fuchsia
Michael Schuerig posted on Thu, 13 Mar 2014 20:12:44 +0100 as excerpted:
> My backup use case is different from the what has been recently
> discussed in another thread. I'm trying to guard against hardware
> failure and other causes of destruction.
>
> I have a btrfs raid1 filesystem spread over two disks. I want to backup
> this filesystem regularly and efficiently to an external disk (same
> model as the ones in the raid) in such a way that
>
> * when one disk in the raid fails, I can substitute the backup and
> rebalancing from the surviving disk to the substitute only applies the
> missing changes.
>
> * when the entire raid fails, I can re-build a new one from the backup.
>
> The filesystem is mounted at its root and has several nested subvolumes
> and snapshots (in a .snapshots subdir on each subvol).
>
> Is it possible to do what I'm looking for?
AFAICS, as mentioned down the other subthread, the closest thing to this
would be N-way mirroring, a coming feature on the roadmap for
introduction after raid5/6 mode[1] gets completed. The current raid1
mode is 2-way-mirroring only, regardless of the number of devices.
N-way-mirroring is actually my most hotly anticipated feature for a
different reason[2], but for you it would work like this:
1) Setup the 3-way (or 4-way if preferred) mirroring and balance to
ensured copies of all data on all devices.
2) Optionally scrub to ensure the integrity of all copies.
3) Disconnect the backup device(s). (Don't btrfs device delete, this
would remove the copy. Just disconnect.)
4) Store the backups.
5) Periodically get them out and reconnect.
6) Rebalance to update. (Since the devices remain members of the mirror,
simply outdated, the balance should only update, not rewrite the entire
thing.)
7) Optionally scrub to verify.
8) Repeat steps 3-7 as necessary.
If you went 4-way so two backups and alternated the one you plugged in,
it'd also protect against mishap that might take out all devices during
steps 5-7 when the backup is connected as well, since you'd still have
that other backup available.
Unfortunately, completing raid5/6 support is still an ongoing project,
and as a result, fully functional and /reasonably/ tested N-way-mirroring
remains the same 6-months-minimum away that it has been for over a year
now. But I sure am anticipating that day!
---
[1] Currently, the raid5/6 support is incomplete, the parity is
calculated and writes are done, but some restore scenarios aren't yet
properly supported and raid5/6-mode scrub isn't complete either, so the
current code is considered testing-only, not for deployment where the
raid5/6 feature would actually be relied on. That has remained the
raid5/6 status for several kernels now, as the focus has been on bugfixing
other areas including snapshot-aware defrag which is currently
deactivated due to horrible scaling issues (current defrag COWS the
operational mount only, duplicating previously shared blocks), send/
receive.
[2] In addition to loss of N-1 device-protection, I really love btrfs'
data integrity features and the ability to recover from other copies if
the one is found to be corrupted, which is why I'm running raid1 mode
here. But currently, there's only the two copies and if both get
corrupted... My sweet spot would be three copies, allowing corruption of
two and recovery from the third, which is why I personally am so hotly
anticipating N-way-mirroring, but unfortunately, it's looking a bit like
the proverbial carrot on the stick in front of the donkey, these days.
--
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-03-14 6:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 19:12 Incremental backup for a raid1 Michael Schuerig
2014-03-13 19:28 ` Hugo Mills
2014-03-13 19:48 ` Andrew Skretvedt
2014-03-13 21:09 ` Brendan Hide
2014-03-13 21:14 ` Michael Schuerig
2014-03-13 22:04 ` Chris Murphy
2014-03-13 23:03 ` Michael Schuerig
2014-03-14 0:29 ` George Mitchell
2014-03-14 1:14 ` Lists
2014-03-14 3:37 ` Chris Murphy
2014-03-15 11:35 ` Michael Schuerig
2014-03-15 11:53 ` Hugo Mills
2014-03-15 16:01 ` George Mitchell
2014-03-14 6:42 ` Duncan [this message]
2014-03-14 8:56 ` Michael Schuerig
2014-03-14 11:24 ` Duncan
2014-03-14 13:46 ` George Mitchell
2014-03-14 14:36 ` Duncan
2014-03-14 14:44 ` Austin S Hemmelgarn
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$60e7c$45de97e1$2fb9daeb$288befdc@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