The block storage service (cinder) image caching feature, which is enabled by default as of Metacloud 4.1.5 (Liberty), significantly speeds up creation of volumes based on images. When you create a new volume based on an image, the service clones the volume and caches it. Each time you boot another volume from the given image, the service simply clones the cached volume.
Depending on the size, number, and purpose of volumes that you create, this capability greatly reduces boot times for volumes created from images.
Because volume image caching is enabled by default, you use it simply by creating a volume from an image and specifying a supported volume type, as in the following example:
$ openstack volume create <VOLUME_NAME> --image <IMAGE_ID> --type solidfire
Notes: Metacloud supports volume image caching with SolidFire and Pure Storage backends. Also, this feature is not available with Ceph. Booting a virtual machine (VM) from a Ceph root disk results in a full clone of the image, which makes caching unnecessary.
Locating the Cached Volume
If you are using Pure Storage, the cached volume is stored in the service tenant of your cloud. After creating a volume, you can see the cached volume as well as the one you just booted by running:
$ openstack volume list --all-projects
You can easily identify the volume that is being cached because its name begins with the word image-, followed by the ID the image used to create the volume. Note also, that the tenant ID of the cached volume is that of the service tenant.
Note: Do not remove cached volumes, or perform any other actions, in the service tenant.
If you are using a SolidFire solution, the cached volume is stored in the SolidFire cluster.
Cleanup of Old Cached Volumes on Pure Storage Backends
For Pure Storage backends, Metacloud enforces limits for number and total gigabytes (GB) of cached volumes. By default, the allowed maximum number of cached volumes per storage backend is 100. The maximum total size of cached volumes is 250 GB.
When either limit is reached, cached volumes are deleted, starting with the oldest, until the number or total size of cached volumes returns below the threshold.
If you notice that creating a particular volume takes longer than usual, it may not be created from a cached volume. If you are using a Pure Storage backend, this may be because a previously cached volume has been deleted.
Tip: To change the maximum number or total GB of cached volumes, submit a request to Metacloud Support. Use the P4 (Standard) priority level.