Migrating Volumes using the Command-line Interface

A volume is a detachable block storage device, similar to a USB hard drive. You can attach a volume to only one instance. To create and manage volumes, you use a combination of nova and cinder client commands.

As an administrator, you can migrate a volume with its data from one location to another in a manner that is transparent to users and workloads. You can migrate only detached volumes with no snapshots.

You can use data migration to perform the following:

  • Bring down a physical storage device for maintenance without disrupting workloads.

  • Modify the properties of a volume.

  • Free up space in a thinly-provisioned back end.

Use the cinder migrate command to perform a data migration.

$ cinder migrate volumeID destinationHost --force-host-copy <True|False>

Use, --force-host-copy True to force the generic host-based migration mechanism and bypass any driver optimizations.

If the volume has snapshots, the specified host destination cannot accept the volume. If the user is not an administrator, the migration fails.