[Box Backup] Two backup-servers

Stuart D. Gathman boxbackup@boxbackup.org
Tue, 12 Aug 2008 11:34:52 -0400 (EDT)


On Mon, 11 Aug 2008, Chris Wilson wrote:

> > When using LVM on Linux, any journaled filesystem (e.g. ext3, xfs, jfs,
> > reiserfs, etc) can be used with the LVM snapshot mechanism.
> 
> But is not guaranteed to be consistent when the snapshot is taken. Only 
> xfs with xfs_freeze is so guaranteed, to my knowledge.

The snapshot looks like a hard reset to the fs.  The entire point of
journaling (and the attendant loss of performance) is to remain consistent
across such failures.  If the filesystem is not consistent after the
snapshot (and replaying the journal upon mounting the snapshot), then the
journaling is broken.

Now you probably know all that and aren't an idiot, so I'm trying to think
of what you really mean:

1) applications (e.g. database) may or may not have a way to stay consistent
   across a reset.  Depends on the application.

2) An application may depend on filesystem data journaling for its
consistency across reset.  (My database doesn't - it does an fsync before
rotating the database journal.)  Ext3 optionally supports this at a cost
in performance.

3) The filesystem journal may be on a separate volume for higher performance.
Yes, ext3 can't maintain consistency across a snapshot with a detached
journal, and there is no atomic was to take multiple snapshots - I wouldn't be
surprised if xfs was the only fs that could handle this.

BTW, it would be nice to have a standard dbus message to tell applications
to get ready for a snapshot (and when the snapshot is done).

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.