You want to migrate volumes from one Cinder pool to another pool.
- Platform9 Managed OpenStack - All Versions
There are two major scenarios for which volume migration is supported in Cinder:
- Migration between two back-ends with the same volume type, regardless if they are located on the same cinder-volume host or not.
cinder migrate [--force-host-copy [<True|False>]]Note: Currently, error handling for failed migration operations is under development in Cinder. If you would like the volume migration to finish without any interruption, please set –-lock-volume to True. If it is set to False, Openstack cannot predict what will happen, if other actions like attach, detach, extend, etc, are issued on the volume during the migration. It all depends on which stage the volume migration has reached and when the request for another action comes.
<volume> ID of volume to migrate.
<host> Destination host. The format of host is
host@backend#POOL, while 'host' is the host
name of the volume node, 'backend' is the back-end
name and 'POOL' is a logical concept to describe
a set of storage resource, residing in the
back-end. If the back-end does not have specified
pools, 'POOL' needs to be set with the same name
Enables or disables generic host-based force-
migration, which bypasses the driver optimization.
Enables or disables the termination of volume
migration caused by other commands. This option
applies to the available volume. True means it locks
the volume state and does not allow the migration to
be aborted. The volume status will be in maintenance
during the migration. False means it allows the volume
migration to be aborted. The volume status is still in
the original status. Default=False.
- Migration between two back-ends with different volume types, regardless if the back-ends are located on the same cinder-volume host or not. Here, the source volume type and destination volume type must be different and they must refer to different back-ends.
cinder retype --migration-policy on-demand <volume> <volume-type> Mandatory arguments: <volume> Name or ID of volume for which to modify type. <volume-type> New volume type.
Please refer to the official document for more information.
Volume Migration via CLI.