[Box Backup] Two backup-servers

Chris Wilson boxbackup@boxbackup.org
Thu, 21 Aug 2008 00:40:03 +0100 (BST)


Hi Stuart,

On Tue, 12 Aug 2008, Stuart D. Gathman wrote:

> 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.

Or 4) the filesystem needs a fsck to regain consistency, which means that 
you need a writable snapshot. That's what I meant. It's not the end of the 
world, but I've never tried it.

MySQL MyISAM tables are not consistent at the application level after a 
hard reset (or snapshot) and may need repairing. InnoDB should be OK.

> 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).

Something like Microsoft VSS? :-)

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\ _/_/_/_//_/___/ | We are GNU : free your mind & your software |