Add documentation for Volume-backed image feature
In Liberty release of Cinder, quick volume creation from Volume-backed image is supported, and some options are added for it. This describes the new options and how to use the feature. Change-Id: Ic581b27ba5ab26938cacd90964081f0bce856501 Closes-Bug: #1488739
This commit is contained in:
@@ -70,4 +70,5 @@ troubleshoot your installation and back up your Compute volumes.
|
||||
blockstorage_ratelimit_volume_copy_bandwidth.rst
|
||||
blockstorage_over_subscription.rst
|
||||
blockstorage_image_volume_cache.rst
|
||||
blockstorage_volume_backed_image.rst
|
||||
blockstorage_get_capabilities.rst
|
||||
|
@@ -0,0 +1,72 @@
|
||||
.. _volume_backed_image:
|
||||
|
||||
|
||||
===================
|
||||
Volume-backed image
|
||||
===================
|
||||
|
||||
OpenStack Block Storage can quickly create a volume from an image that refers
|
||||
to a volume storing image data (Image-Volume). Compared to the other stores
|
||||
such as file and swift, creating a volume from a Volume-backed image performs
|
||||
better when the block storage driver supports efficient volume cloning.
|
||||
|
||||
If the image is set to public in the Image service, the volume data can be
|
||||
shared among tenants.
|
||||
|
||||
Configure the Volume-backed image
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Volume-backed image feature requires locations information from the cinder
|
||||
store of the Image service. To enable the Image service to use the cinder
|
||||
store, add ``cinder`` to the ``stores`` option in the ``glance_store`` section
|
||||
of the :file:`glance-api.conf` file::
|
||||
|
||||
stores = file, http, swift, cinder
|
||||
|
||||
To expose locations information, set the following options in the ``DEFAULT``
|
||||
section of the :file:`glance-api.conf` file::
|
||||
|
||||
show_multiple_locations = True
|
||||
|
||||
To enable the Block Storage services to create a new volume by cloning Image-
|
||||
Volume, set the following options in the ``DEFAULT`` section of the
|
||||
:file:`cinder.conf` file. For example::
|
||||
|
||||
glance_api_version = 2
|
||||
allowed_direct_url_schemes = cinder
|
||||
|
||||
To enable the :command:`cinder upload-to-image` command to create an image
|
||||
that refers an Image-Volume, set the following options in each back-end
|
||||
section of the :file:`cinder.conf` file::
|
||||
|
||||
image_upload_use_cinder_backend = True
|
||||
|
||||
By default, the :command:`upload-to-image` command creates the Image-Volume in
|
||||
the current tenant. To store the Image-Volume into the internal tenant, set the
|
||||
following options in each back-end section of the :file:`cinder.conf` file::
|
||||
|
||||
image_upload_use_internal_tenant = True
|
||||
|
||||
|
||||
Creating a Volume-backed image
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To register an existing volume as a new Volume-backed image, use the following
|
||||
commands::
|
||||
|
||||
$ glance image-create --disk-format raw --container-format bare --name <name>
|
||||
|
||||
$ glance location-add <image-uuid> --url cinder://<volume-uuid>
|
||||
|
||||
If the ``image_upload_use_cinder_backend`` option is enabled, the following
|
||||
command creates a new Image-Volume by cloning the specified volume and then
|
||||
registers its location to a new image. The disk format and the container format
|
||||
must be raw and bare (default). Otherwise, the image is uploaded to the default
|
||||
store of the Image service.::
|
||||
|
||||
$ cinder upload-to-image <volume> <image-name>
|
||||
|
||||
.. note::
|
||||
Currently, the cinder store of the Image services does not support uploading
|
||||
and downloading of image data. By this limitation, Volume-backed images can
|
||||
only be used to create a new volume.
|
Reference in New Issue
Block a user