3.7. Volume-from-image optimization with Block Storage back ends
When you use the Block Storage service (cinder) as a back end for the Image service (glance), volume creation from images can be optimized with back-end-assisted cloning instead of image downloads.
When you create a bootable volume from an image that is stored as an image-volume in the Block Storage back end, the volume creation process clones the image-volume at the storage back-end level. This back-end-assisted cloning is significantly faster than the traditional method of downloading the image data from the Image service and copying it to the new volume.
In a Red Hat OpenStack Services on OpenShift (RHOSO) environment, the Block Storage service is configured with the allowed_direct_url_schemes parameter set to cinder by default. This configuration enables the service to detect when an image is stored as a Block Storage volume and use back-end-assisted cloning for bootable volume creation.
You can also enable upload-to-image optimization to improve the performance of uploading volumes to the Image service.
- Requirements
-
The image must use the
rawformat andbarecontainer format. - You must create the volume in the same project as the image.
-
The image volume and the destination volume must be on the same storage pool. The Block Storage service matches volumes based on the
backend#poolidentifier. For example, both volumes must be oncinder-volume-host@backend#pool_name. - The storage back end must support efficient volume cloning. Most back ends support this optimization, including NetApp ONTAP, Dell PowerFlex, and other back ends with clone capabilities.
- For environments where the Image service creates multiple volumes simultaneously, use a multiattach-enabled volume type for best results.
-
The image must use the
- Limitations
- In distributed environments with multiple pools, the system can only clone images efficiently to volumes in the same pool. Volumes created in different pools use the traditional download method for the first volume creation, but can benefit from the image-volume cache feature for subsequent creations.