linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jon Nelson" <jnelson-linux-raid@jamponi.net>
Cc: linux-raid@vger.kernel.org
Subject: Re: Backups w/ rsync
Date: Fri, 28 Sep 2007 11:52:31 -0500	[thread overview]
Message-ID: <cccedfc60709280952k125f9356oa7f476a490a9ff@mail.gmail.com> (raw)
In-Reply-To: <46FD2AF3.4040501@tmr.com>

On 9/28/07, Bill Davidsen <davidsen@tmr.com> wrote:
> What I don't understand is how you use hard links... because a hard link
> needs to be in the same filesystem, and because a hard link is just
> another pointer to the inode and doesn't make a physical copy of the
> data to another device or to anywhere, really.

Yes, I know how hard links work. There is (one) physical copy of the
data when it goes from the filesystem on the raid to the filesystem on
the drbd. Subsequent "copies" of the same file, assuming the file has
not changed, are all hard links on the drbd-backed filesystem. Thus, I
have one *physical* copy of the data and a whole bunch of hard links.
Now, since I'm using drbd I actually have *two* physical copies (for a
total of three if you include the original) because the *other*
machine has a block-for-block copy of the drbd device (or it did, as
of a few days ago).

link-dest basically works like this:

Assuming we are going to "copy" (using that word loosely here) file
"A" from "/source" to "/dest/backup.tmp/", and we've told rsync that
"/dest/backup.1/A" might exist:


If "/dest/backup.1/A" does not exist: make a physical copy from
"/source/A" to "/dest/backup.tmp/A".
If it does exist, and the two files are considered identical, simply
hardlink "/dest/backup.tmp/A" to "/dest/backup.1/A".
When all files are copied, move every "/dest/backup.N" (N is a number)
to "/dest/backup.N+1"
If /dest/backup.31 exists, delete it.
Move /dest/backup.tmp to /dest/backup.1 (which was just renamed /dest/backup.2)

I can do all of this, for 175K files (40G), in under 2 minutes on
modest hardware.
I end up with:
1+1 physical copies of the data (local drbd copy and remote drbd copy)

There is more but if I may suggest: if you want more details contact
me off-line, I'm pretty sure the linux-raid folks couldn't care less
about rsync and drbd.
-- 
Jon

  reply	other threads:[~2007-09-28 16:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18 23:09 Help: very slow software RAID 5 Dean S. Messing
2007-09-19  0:05 ` Justin Piszcz
2007-09-19  1:49   ` Dean S. Messing
2007-09-19  8:38     ` Justin Piszcz
2007-09-19 17:49       ` Dean S. Messing
2007-09-19 18:25         ` Justin Piszcz
2007-09-19 23:31           ` Dean S. Messing
2007-09-20  8:25             ` Justin Piszcz
2007-09-20 18:16             ` Michal Soltys
2007-09-20 19:06               ` Dean S. Messing
2007-09-20 15:33         ` Bill Davidsen
2007-09-20 18:47           ` Dean S. Messing
2007-09-20 21:08             ` Michael Tokarev
2007-09-21  0:58               ` Dean S. Messing
2007-09-21 13:00                 ` Bill Davidsen
2007-09-21 20:01                   ` Dean S. Messing
2007-09-21 20:21                   ` Dean S. Messing
2007-09-25  9:31                 ` Goswin von Brederlow
2007-09-25 18:16                   ` Dean S. Messing
2007-09-25 21:46                     ` Goswin von Brederlow
2007-09-25 23:50                       ` Dean S. Messing
2007-09-26  1:45                         ` Goswin von Brederlow
2007-09-27  6:23                           ` Dean S. Messing
2007-09-27  9:51                             ` Michal Soltys
2007-09-27 22:10                               ` Backups w/ rsync (was: Help: very slow software RAID 5.) Dean S. Messing
2007-09-28  7:57                                 ` Backups w/ rsync Michael Tokarev
2007-09-28 10:23                                   ` Goswin von Brederlow
2007-09-28 11:18                                     ` Michal Soltys
2007-09-28 12:47                                       ` Goswin von Brederlow
2007-09-28 14:17                                         ` Michal Soltys
2007-09-29  0:11                                   ` Dean S. Messing
2007-09-29  8:43                                     ` Michael Tokarev
2007-09-28 14:48                                 ` Bill Davidsen
2007-09-28 14:57                                   ` Wolfgang Denk
2007-09-28 16:50                                     ` Bill Davidsen
2007-10-01  4:45                                     ` Michal Soltys
2007-09-28 15:11                                   ` Jon Nelson
2007-09-28 16:25                                     ` Bill Davidsen
2007-09-28 16:52                                       ` Jon Nelson [this message]
2007-09-27 22:40                         ` Help: very slow software RAID 5 Bill Davidsen
2007-09-28 23:38                           ` Dean S. Messing
2007-09-29 14:52                             ` Bill Davidsen
2007-09-27 22:17                     ` Bill Davidsen
2007-09-28 23:21                       ` Dean S. Messing

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=cccedfc60709280952k125f9356oa7f476a490a9ff@mail.gmail.com \
    --to=jnelson-linux-raid@jamponi.net \
    --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).