Jump to: navigation, search

CloneVolume

Revision as of 23:31, 17 February 2013 by Ryan Lane (talk | contribs) (Text replace - "NovaSpec" to "NovaSpec")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  • Launchpad Entry: NovaSpec:clone-volume
  • Created: 2011-4-19
  • Contributors: Kazutaka Morita

Summary

Create a new volume from a snapshot with the EC2 api

Release Note

This adds support for "--snapshot" option of euca-create-volume, and enable us to create a new volume from a existing snapshot volume.

Rationale

It is useful for hosting companies to create lots of same volumes from one golden snapshot.

User stories

  • User can create a same volume instantly from a golden snapshot.
  • User can create a new image from a backuped snapshot volume.
$ euca-describe-snapshots
SNAPSHOT        snap-00000001   vol-00000001    available       2011-04-19T20:18:19Z    100%
$ euca-create-volume -z 0 --snapshot snap-00000001
VOLUME  vol-00000002    4       snap-00000001   creating (admin, None, None, None)      2011-04-19T20:53:46Z
$ euca-describe-volumes
VOLUME  vol-00000001     4              nova    available (admin, lucid64, None, None)  2011-04-19T20:18:10Z
VOLUME  vol-00000002     4      snap-00000001   nova    available (admin, lucid64, None, None)  2011-04-19T20:53:46Z


Assumptions

A backend storage of nova-volume must support snapshotting.

Implementation

This adds a new column 'snapshot_id' to the table 'volumes' in the database

snapshot_id = Column('snapshot_id', Integer())