Migrating Image Library from Local Drive to Cinder Volume

This guide provides step-by-step instructions for migrating the Private Cloud Director Image Library backend from a local drive (file backend) to a Cinder volume (cinder backend), along with important considerations for High Availability (HA) mode and multi-host Image Library configurations.

Overview

By default, the Image Service in the Private Cloud Director uses a local file-based backend to store VM images. For enhanced scalability, persistence, and centralized management, it is recommended that the image library be migrated to use a Cinder volume.

Migrating to a Cinder backend is particularly beneficial in High Availability (HA) environments and supports future scalability through multi-host image library configuration.

Prerequisites

  • The Private Cloud Director environment is already deployed with a functional Image Library using the file backend.

  • A Cinder-compatible storage backend is configured and available.

  • At least one available volume for storing the image library.

  • Image Library role is assigned on one or more hosts.

  • Administrator access to all relevant nodes and services.

  • Downtime window for migration (this process involves stopping image services).

Step-by-Step Instructions

Step 1: Prepare the Cinder Volume

Create a new Cinder volume with sufficient capacity to hold all existing images (plus future growth).

Attach the volume to the host where the Image Library role is currently assigned.

On the host, identify the volume device (e.g., /dev/vdb) and mount it:

Copy existing image data from local image library (default: /opt/pf9/pf9-glance/images) to the mounted Cinder volume:

Update the system to mount the volume persistently:

Step 2: Update Glance Configuration

Edit the Glance configuration file (e.g., /etc/glance/glance-api.conf) and set the following backend settings:

Restart the Glance service:

Verify the backend is now using Cinder:

Info

Ensure the Image Service on each node is configured correctly with the same backend settings and the volume is mounted identically across all nodes.

High Availability and Multi-Host Image Library Considerations

  • HA Mode Support: Using a Cinder volume for the image library is fully supported in HA mode, as Cinder provides persistent and shared storage accessible across multiple controller nodes.

  • Multi-Host Image Library: If multiple hosts have the Image Library role:

    • The Cinder backend ensures centralized image access without needing data synchronization between nodes.

    • All image library nodes must have access to the Cinder volume and appropriate authentication configured.

Last updated

Was this helpful?