All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas McClendon <dmc.fedora@filteredperception.org>
To: dm-devel@redhat.com
Subject: Re: semop failed for cookie?
Date: Wed, 28 Apr 2010 22:32:54 -0500	[thread overview]
Message-ID: <4BD8FDE6.40507@filteredperception.org> (raw)
In-Reply-To: <20100429000045.GF29708@agk-dp.fab.redhat.com>

On 04/28/2010 07:00 PM, Alasdair G Kergon wrote:
> On Wed, Apr 28, 2010 at 06:11:46PM -0500, Douglas McClendon wrote:
>> device-mapper: snaphots: Unable to perform snapshot handover until
>> source is suspended.
>
> It has never been OK to have the same snapshot metadata in use
> simultaneously in two targets at once (because of caching in memory).
> It's the responsibility of userspace to adhere to the correct semantics
> or live with the potential data corruption if they are violated.  It
> sounds like your process may fall into that second category.

Yeah, I had a hunch I was 'getting away with something'.  I.e. I wasn't 
acutely aware of the 3 differentiatable phases of the create.  In my 
case, literally nothing would happen while both instances were 'live', 
except the handoff.  And it seemed to work very reliably.  I.e. I would do

dmsetup create --table="same as rootfs's table (a snapshot)" rootfs-copy
dmsetup reload --table"mirror, goodside rootfs-copy, badside harddisk" 
rootfs
dmsetup resume rootfs

I guess I'll have to learn the new snapshot handover stuff.  Just let me 
know if you suspect some impossibility here.  Or if there is a magic 
--live-dangerously flag I can use :)

-dmc


>
> Part of the process of adding snapshot merging support involved
> providing a controlled method for handing over the snapshot metadata
> from one target instance to another.
>
> If you are trying to move a snapshot from one target to another, then
> you must either deactivate the snapshot first (older kernels) or (newer
> kernels) make use of the 'snapshot handover' mechanism as the message
> suggests.
>
> Alasdair

  reply	other threads:[~2010-04-29  3:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 20:56 semop failed for cookie? Douglas McClendon
2010-04-27 22:33 ` Alasdair G Kergon
2010-04-28  3:52   ` Douglas McClendon
2010-04-28 23:11   ` Douglas McClendon
2010-04-29  0:00     ` Alasdair G Kergon
2010-04-29  3:32       ` Douglas McClendon [this message]
2010-04-29 16:23         ` Alasdair G Kergon
2010-05-03  1:36           ` Douglas McClendon
2010-05-05  5:18           ` Snapshot handover working, yippee!, was " Douglas McClendon
2010-05-05 15:22             ` Mike Snitzer
2010-04-28  9:38 ` Peter Rajnoha

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=4BD8FDE6.40507@filteredperception.org \
    --to=dmc.fedora@filteredperception.org \
    --cc=dm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.