[dm-devel] semop failed for cookie?

Douglas McClendon dmc.fedora at filteredperception.org
Thu Apr 29 03:32:54 UTC 2010


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




More information about the dm-devel mailing list