Storage: Copy-on-write cloning for rbd-backed disks

Registered by Josh Durgin on 2014-02-04

Currently rbd-backed ephemeral disks are created by downloading an image from glance to a local file, then uploading that file into rbd. Even if the file is cached. uploading may take a long time, since 'rbd import' is synchronous and slow. If the image is stored in rbd already by glance, there's no need for any local copies - it can be cloned to a new image for a new disk without copying the data at all.

Blueprint information

John Garbutt
Josh Durgin
Josh Durgin
Series goal:
Accepted for juno
Milestone target:
milestone icon 2014.2
Started by
Josh Durgin on 2014-02-04
Completed by
John Garbutt on 2014-09-01

Related branches



Addressed by:
    Move libvirt RBD utilities to a new file
Addressed by:
    enable cloning for rbd-backed ephemeral disks

What will happen if the image being removed from glance (rbd storage backed) by admin/operator which acting a "linked" base image used by some provisioned instances dealed with RBDCloneImageHandler (#59149 added)? Do you think we need to protect and provent the image to be deleted which been used by Nova as the CoW base? -- zhiyan

rbd handles that internally with a concept of protected snapshots, which the glance store uses - see
-jdurgin 05 Feb

Gerrit topic:,topic:bug/1226351,n,z

Addressed by:
    enable cloning for rbd-backed ephemeral disks

This was merged, then reverted in icehouse. It will be respun for Juno based on the older patch ( with no dependency on image-multiple-locations. Once image-multiple-locations is merged it can be refactored into an image handler, but it seems like much more work is being asked for now before merging image-multiple-locations again, which does not need to block this blueprint.
-jdurgin 14 Mar 14

Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)

Gerrit topic:,topic:bp/rbd-clone-image-handler,n,z

Addressed by:
    Storage: Copy-on-write cloning for RBD-backed disks

Addressed by:
    Move libvirt RBD utilities to a new file

Addressed by:
    Use library instead of CLI to cleanup RBD volumes

Addressed by:
    enable cloning for rbd-backed ephemeral disks

Addressed by:
    Add include_locations kwarg to nova.image.API.get()

The only outstanding patch related to this blueprint is
    count image files on NFS as shared block storage
(fixes a regression for NFS backed live migrations introduced in

I think it's time to mark this blueprint as completed.
-angdraug Aug 14


Work Items