Migrating Cinder Volumes in LVM Storage Backend
Problem
By default, the Cinder Scheduler will use its algorithm to create volumes on any one of the block storage hosts it finds best suited according to volume metadata. However, if a new block storage host is added at a later date which is more optimized for storage or simply has more space than an older host there is a need to migrate volumes from one host to the other.
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.
Possible use cases for data migration include:
- Bringing down a physical storage device for maintenance without disrupting workloads.
- Modifying the properties of a volume.
- Freeing up space in a thinly-provisioned back end.
Note: You can migrate only detached volumes with no snapshots.
Environment
- Platform9 Managed OpenStack - v3.6.0 and Higher
- LVM Backend
- OpenStack CLI
- Cinder
Procedure
Warning: Ensure that the volume you are trying to migrate has been detached from any instance and ensure the volume has no snapshots.
- Get the current details of the volume.
- The current host of the volume is reflected in the os-vol-host-attr:host parameter.
- Obtain the available backends.
Note: The output will always be in the format: host_uuid@backend-name#pool.
- Copy the full name ( host_uuid@backend-name#pool) of the host you want to migrate the volume to, to the clipboard.
- Initiate volume migration.
- Check the migration_status attribute in the output.
- The migration_status displays "success"once the migration completes. The os-vol-host-attr:host will now display the new host information.
Additional Information
- For guidance with installing the OpenStack CLI client on your machine, refer to Installing OpenStack CLI Clients.