From: Mike Snitzer <snitzer@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Powerfailure and snapshot consistency
Date: Sat, 26 Mar 2011 16:30:23 -0400 [thread overview]
Message-ID: <20110326203022.GA11173@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.00.1103261143510.28300@bmsred.bmsi.com>
On Sat, Mar 26 2011 at 12:07pm -0400,
Stuart D. Gathman <stuart@bmsi.com> wrote:
> On Sat, 26 Mar 2011, Ron Johnson wrote:
>
> >>Yes, but a power failure can then mess up the ordering of write completions
> >>distributed between 2 or more PVs, which could defeat the assumptions made
> >>by your file system journaling.
> >
> >File a bug... But against what? LVM? The FS? The block layer?
>
> It is not a bug. Some progress can be made with barriers (similar to fsync())
> that block until all affected blocks are confirmed written on all devices
> through all levels of the storage stack (e.g. written to all legs
> of a raid1 device). My database does an fsync after each journal batch,
> and I think it reasonable to hope that this guarantees that the writes
> from the journal batch complete before any subsequent writes. I don't
> depend on any other ordering.
>
> In the case of a snapshot, I believe the COW and origin blocks are written
> in parallel. Snapshots are slow enough as it is. :-) So it is not
> surprising that it loses consistency on power failure.
The cow is completed before the origin is written. In addition, the
snapshot volume offers full support for flush (barriers) to both the
origin and snapshot devices.
Your FUD about inconsistency due to the snapshot implementation needs
to be substantiated with something more than an incoherent guesswork
theory.
That said, anything is possible. But if you want real help you need to
be specific about which kernel you're using. What is your underlying
hardware (and caching mode)? And what it was you were doing at the time
of the power failure (running some FS benchmark? or what?).
next prev parent reply other threads:[~2011-03-26 20:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-26 4:24 [linux-lvm] Powerfailure and snapshot consistency Stuart D. Gathman
2011-03-26 4:42 ` Ron Johnson
2011-03-26 4:52 ` Stuart D. Gathman
2011-03-26 5:25 ` Ron Johnson
2011-03-26 5:53 ` hansbkk
2011-03-26 16:07 ` Stuart D. Gathman
2011-03-26 20:30 ` Mike Snitzer [this message]
2011-03-27 21:55 ` Stuart D. Gathman
2011-03-28 17:20 ` Phillip Susi
2011-03-28 17:24 ` Stuart D. Gathman
2011-03-28 17:37 ` Phillip Susi
2011-03-28 21:26 ` Stuart D. Gathman
2011-03-28 18:34 ` Mike Snitzer
2011-03-28 17:26 ` Les Mikesell
2011-03-28 17:54 ` Stuart D. Gathman
2011-03-28 19:43 ` Ron Johnson
2011-03-26 7:49 ` Ray Morris
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=20110326203022.GA11173@redhat.com \
--to=snitzer@redhat.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).