linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Dan Kegel" <dank@kegel.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] snapshots and filesystem freezing
Date: Fri, 8 Feb 2008 04:28:04 -0800	[thread overview]
Message-ID: <a71bd89a0802080428h5c58abf5v8328a82a9f7d7487@mail.gmail.com> (raw)
In-Reply-To: <47AC455E.4030502@wpkg.org>

On Feb 8, 2008 4:04 AM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
> Some filesystems, like xfs, have a "freeze" feature. There was a
> discussion on lkml about implementing it in ext3, too.
>
> What is the relationship between a filesystem freeze and LVM snapshots?
>
> As far as I understand, snapshotting a filesystem in any random
> timepoint can mean that the snapshotted fs will be inconsistent (i.e.,
> may need fsck).
> "Freezing" the filesystem will flush all writes to the media, and a
> snapshotted fs should be consistent then (in theory; without an
> interface between filesystem freeze and LVM snapshot it does not
> guarantee that the operation is "atomic").

Historically, executing sync() does most of what freeze does,
though there's a risk that some pesky process will go and do
a write (or some in-flight write will land) after the sync and before
you finish the snapshot.
XFS decided to be different; I think they wanted to shout out to the
world that the old sync() idea was racy, so they refused to implement
it properly, and introduced the theoretically safer freeze/thaw idea.
They may yet drag the rest of us kicking and screaming into the modern world.

Comments in
http://www.paragon-cs.com/wordpress/?p=67 mention that
one used to have to do the xfs freeze manually, but lvm2 now does it for you.
(It also mentions that you really want to manually quiesce your apps, too.)
- Dan

      reply	other threads:[~2008-02-08 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 12:04 [linux-lvm] snapshots and filesystem freezing Tomasz Chmielewski
2008-02-08 12:28 ` Dan Kegel [this message]

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=a71bd89a0802080428h5c58abf5v8328a82a9f7d7487@mail.gmail.com \
    --to=dank@kegel.com \
    --cc=linux-lvm@redhat.com \
    /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).