[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Maildir backup



Jan Ingvoldstad wrote:
On Wed, Jan 28, 2009 at 7:28 PM, Oliver Hitz <oliver@net-track.ch> wrote:

By the way, you can have stable filesystem snapshots using XFS and LVM:

- xfs_freeze -f freezes your filesystem in a consistent state
- create your lvm snapshot
- xfs_freeze -u thaws the filesystem

This is not advisable in a live e-mail system, because:

This method will freeze access to the filesystem for a short duration.

I'm using this for backing up vmware images, which are 2 GB files.
Before freezing the filesystem, I pause the VM in question and resume it
afterwards. In my case, services are stopped for maybe one or two
minutes, depending on the time vmware takes to pause and resume.

Freezing a live mail system may not be quite so quick, since you ought
to gracefully handle termination of  current connections. Remember
that not only SMTP will be affected, causing random delays, but also
reader processes will have to be denied for the duration.

If your file system is served via NFS, then you can have files that
remain open for a very long time after you initiated your shutdown
process.

Now, there are ways around this in freeware, but they add complexity
to the mail delivery system.

ZFS snapshots seem to be a more workable approach than LVM snapshots,
but then your file server should be running Solaris (e.g.
OpenSolaris), or FreeBSD if your sense of adventure is merely mild.

I've never used XFS freeze/thaw in any heavy use systems, but it was always my impression that it was just like hitting the pause button to quickly get a consistent state. You don't have to gracefully halt/close anything, I/O should just sit in a wait state waiting for the fs to be thawed.

I just did a XFS freeze/thaw very quickly (about 8 seconds total) on a busy IMAP server and it acted just like a pause. Current IMAP/POP3 sessions weren't interrupted at all, and a "delete" I did on my IMAP connection during the freeze didn't execute until the thaw.

~Seth


Reply to: