[Sheepdog] Using snapshot to implement clone

Chris Webb chris at arachsys.com
Wed Aug 3 14:46:55 CEST 2011


I'm working on an release of our cloud infrastructure platform using
Sheepdog to provide drive storage instead of LVM LVs + iscsi as at present.

Part of our system is a drive clone facility, which makes a new drive as a
clone of the (current state of) an existing drive. We want to (continue to)
expose a simple concept of a drive to users, rather than distinct drive and
snapshot objects, with snapshots having a subset of the facilities of
drives.

I have done a preliminary implementation of this as

  - qemu-img snapshot the source vdi
  - find the snapshot id of this snapshot with collie vdi list
  - qemu-img create a new vdi using the newly-created snapshot as a base
  - collie vdi delete the temporary snapshot of the source vdi

It all seems to work quite nicely, but I wonder whether there are any
potential issues with creating lots of very ephemeral snapshots like this?
The vdi IDs will obvious get fairly large, but that is presumably not a
disaster in itself, unless there are also internal resources being used very
inefficiently by a pattern like this?

Cheers,

Chris.



More information about the sheepdog mailing list