linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] How do you mount a snapshot?
Date: Mon, 11 Dec 2000 11:35:13 -0700 (MST)	[thread overview]
Message-ID: <200012111835.eBBIZDs07974@webber.adilger.net> (raw)
In-Reply-To: <20001210224808.B3772@archimedes.oak.suse.com> "from David Gould at Dec 10, 2000 10:48:08 pm"

David Gould writes:
> On Fri, Dec 08, 2000 at 09:30:50PM +0100, Christian Limpach wrote:
> > > Ok, so we are agreeing, it does not work on ext2 either unless you sync
> > > and do not write between the sync and the snapshot. Doable, but not
> > exactly
> > > "safe".
> > 
> > hmm, I think it works for ext2 because you can always mount an ext2
> > filesystem even if it's in an inconsistent state.  This is what happens
> > everytime when your machine panics and you need to fsck your disks during
> > the reboot, the root filesystem is mounted read-only...  It's my
> 
> Ok, but then you have an inconsistant filesystem. Which is not exactly
> what I think of as "works" or "safe". My point was that snapshots are
> great, but don't make the problem of consistancy magically disappear.

Actually, the LVM snapshot code does an fsync_dev() call right before
the snapshot is created, so the window in which the filesystem can
become inconsistent is very small.  For ext2 this is relatively safe,
because fsync_dev() will flush everything to disk.  For ext3 and reiserfs,
the fsync_dev() isn't enough because it may only flush the data to the
journal, and these filesystems will (currently) refuse to mount with a
dirty journal on a read-only device.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

      parent reply	other threads:[~2000-12-11 18:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-07 11:39 [linux-lvm] How do you mount a snapshot? Tracy R Reed
2000-12-07 19:55 ` David Gould
2000-12-07 20:05   ` Chris Mason
2000-12-07 20:37     ` Tracy R Reed
2000-12-07 20:56       ` Chris Mason
2000-12-08  2:25         ` Tracy R Reed
2000-12-08  6:33         ` David Gould
2000-12-08 14:09           ` Chris Mason
2000-12-08 15:08             ` [linux-lvm] LVM Upgrade Magnus Naeslund(f)
2000-12-08 18:30             ` [linux-lvm] How do you mount a snapshot? David Gould
2000-12-08 20:30               ` Christian Limpach
2000-12-11  4:10                 ` [linux-lvm] OOPS while doing vgextend Magnus Naeslund(f)
2000-12-11  6:48                 ` [linux-lvm] How do you mount a snapshot? David Gould
2000-12-11 14:58                   ` Chris Mason
2000-12-11 18:35                   ` Andreas Dilger [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=200012111835.eBBIZDs07974@webber.adilger.net \
    --to=adilger@turbolinux.com \
    --cc=linux-lvm@sistina.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).