3.6. Configuring the Block Storage Image-Volume cache feature


You can enable Image-Volume cache in the Block Storage service (cinder) to improve the speed of volume creation from frequently-used images.

When you enable Image-Volume cache, the first time you create a volume from an image, a copy of the image volume is cached in the internal Block Storage project, cinder-internal. Subsequent requests to create volumes from the image clone the cached copy instead of downloading the original image contents and copying data to the volume.

You can configure Image-Volume cache per back end. If you are using a third-party back end, refer to the storage vendor’s documentation for information about Image-Volume cache support.

You can set the limit of the Image-Volume cache to a size in GB, number of images, or both.

Prerequisites

Procedure

  1. Open your OpenStackControlPlane CR file, openstack_control_plane.yaml, and add the identifiers for your cinder-internal project and project user to the cinder template. In this example, you are using Red Hat Ceph Storage as the back end for the Block Storage service.

    Example:

    apiVersion: core.openstack.org/v1beta1
    kind: OpenStackControlPlane
    spec:
      extraMounts:
        ...
      cinder:
        template:
          cinderVolumes:
            ceph:
              customServiceConfig: |
                [DEFAULT]
                cinder_internal_tenant_project_id = <project_id>
                cinder_internal_tenant_user_id = <user_id>
                ...
    • Replace <project_id> with the ID of your cinder-internal project.
    • Replace <user_id> with the ID of your cinder-internal project user.
  2. Add the following parameters to enable Image-Volume cache and to configure the size limit of the cache and the maximum number of images that the cache can store:

    Example:

    ...
              customServiceConfig: |
                [DEFAULT]
                ...
                [ceph]
                image_volume_cache_enabled = True
                image_volume_cache_max_size_gb = <max_size>
                image_volume_cache_max_count = <max_number>
    ...
    • Replace <max_size> with the size limit of the cache in GB.
    • Replace <max_number> with the maximum number of images to store in the cache.
  3. Update the control plane:

    $ oc apply -f openstack_control_plane.yaml -n openstack
  4. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:

    $ oc get openstackcontrolplane -n openstack

    The OpenStackControlPlane resources are created when the status is "Setup complete".

    提示

    Append the -w option to the end of the get command to track deployment progress.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部