linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Cracauer <cracauer@cons.org>
To: Jeff Klingner <klingner@stanford.edu>
Cc: linux-raid@vger.kernel.org
Subject: Re: raid1 with rotating offsite disks for backup
Date: Mon, 7 Feb 2011 22:04:17 -0500	[thread overview]
Message-ID: <20110208030417.GA65865@cons.org> (raw)
In-Reply-To: <1ADCC31C-C4BD-4D43-829F-9341D3663185@stanford.edu>

Jeff Klingner wrote on Mon, Feb 07, 2011 at 03:53:46PM -0800: 
> I'm planning a backup system for my home server and have run into a question I can't find answered in the mailing list archives or the wiki.  Here's the plan:
> 
> 1. Install system and valuable data on a 3-disk raid1 array (call the disks A, B, and C).
> 2. Remove disk C, put it offsite.  ("offsite" is moderately time-consuming to get to.)
> 3a. Periodically, remove disk B, take it offsite, and retrieve disk C
> 3b. Insert disk C, which will be re-synced to gain any changes made since it was removed.
> 4. Repeat steps 3a and 3b indefinitely, alternating the roles of disks B and C.
> 
> Thus I hope to get continuous protection against a single drive failure and protection back to the last offsite swap for corrupted or deleted data.

You are aware that this will only work reliably if at the point of
time when you remove the disk the filesystem(s) on it are one of:
- mounted readonly
- unmounted
- machine is off

Linux doesn't really have a `umount -f`, so the first two options only
work if you can get rid of all processes that might want to hold on to
the filesystem at the time when you want to remove your disk.  A
possible hack is going through a NFS mount which does support forceful
operations on the filesystem in Linux.

As has been pointed out, you don't gain much from the added
complexity.  If you would just rsync to one of the spare drives you
would only copy over what actually changed, and not do a full re-sync
of all blocks.  And that works fine with the source filesystem being
mounted read-write.

Another problem is that you are temporarily screwed if disk A dies
while re-syncing B, since C isn't with you, A is hosed and B is
half-synced.

What you do lose is that the raid1 based solution would keep the new
disk up-to-date with then-new file disk writes.  But the problem with
filesystem status is hard to solve.  Overall going 4 disks with raid1
local and having two disks that are rsynced on demand is what I would
do.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org>   http://www.cons.org/cracauer/

  parent reply	other threads:[~2011-02-08  3:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 23:53 raid1 with rotating offsite disks for backup Jeff Klingner
2011-02-08  0:17 ` NeilBrown
2011-02-08  1:03   ` Jeff Klingner
2011-02-08  1:19     ` NeilBrown
2011-02-08  1:32       ` Jeff Klingner
2011-02-08  2:02         ` NeilBrown
2011-02-08  4:53   ` Leslie Rhorer
2011-02-08  5:37     ` Roberto Spadim
2011-02-08  6:07       ` NeilBrown
2011-02-08  6:12         ` Roberto Spadim
2011-02-08  3:04 ` Martin Cracauer [this message]
2011-02-08  3:40   ` Roberto Spadim
2011-02-09 19:37 ` hansbkk
2011-02-09 19:53   ` Roberto Spadim
2011-02-10  8:43     ` John Robinson

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=20110208030417.GA65865@cons.org \
    --to=cracauer@cons.org \
    --cc=klingner@stanford.edu \
    --cc=linux-raid@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).