[linux-elitists] rsync hacks (fwd from kragen@pobox.com)

Aaron Sherman ajs@ajs.com
Mon Jul 19 11:54:40 PDT 2004


On Mon, 2004-07-19 at 13:59, Sam Phillips wrote:
> On Mon, Jul 19, 2004, at 13:44 EDT, Etienne Goyer wrote:

> > Filesystem snapshot ?
> 
> True.  That would be the best way to do it.  I haven't looked into what
> it takes under linux to have something like that recently though.

If you're referring to what a NetApp does, they accomplish this by
having copy-on-write semantics at the block level on the file-system.

Once you have that feature, creating an atomic filesystem snapshot is
just a matter of acquiring a global write lock, setting a bit in the
root inode, creating some accounting entries for the "new filesystem"
and releasing the lock.

The nice thing about this is that it's absolutely atomic, so there's no
difference between a filesystem snapshot and the state you would be in
after a reboot. I used this many times when backing up my production,
high-write-volume databases at a previous job. We would snapshot the
filesystem and if we had a problem, we'd just go back to the snapshot
and perform an Oracle "warm start". Never failed.

The good news: it takes very little space to store a copy-on-write
backup.

The bad news: it's difficult or impossible to predict exactly how much
space it will take (as it's based on how much data changes).

NetApp had a nice feature for mirroring snapshots to other systems which
ended up being rather rsync-like except in the NetApp case it didn't
need to examine the target files, so it was much faster.

-- 
Aaron Sherman <ajs@ajs.com>
Senior Systems Engineer and Perl Toolsmith
http://www.ajs.com/~ajs/resume.html





More information about the linux-elitists mailing list