You can migrate Cinder volumes that are unattached to instances to specified target datastores.

Prerequisites

Detach all snapshots from the volumes that you want to migrate.

Procedure

  1. Log in to the Integrated OpenStack Manager as the root user.
    ssh root@mgmt-server-ip
  2. Migrate the volumes.
    • To migrate all volumes from a datastore, run the following command:
      viocli migrate volume --source-dc src-dc-name --source-ds src-ds-name dest-dc-name dest-ds-name [--ignore-storage-policy]
    • To migrate specified volumes from a datastore, run the following command:
      viocli migrate volume --volume-ids UUID1 dest-dc-name dest-ds-name [--ignore-storage-policy]
    Option Description
    --source-dc

    Enter the data center containing the volumes that you want to migrate.

    This parameter must be used together with the --source-ds parameter. If you want to migrate specified volumes only, do not include this parameter.

    --source-ds

    Enter the datastore containing the volumes that you want to migrate.

    This parameter must be used together with the --source-dc parameter. If you want to migrate specified volumes only, do not include this parameter.

    --volume-ids

    Enter the UUID of the volume that you want to migrate. You can include multiple UUIDs separated by commas (,).

    If you want to migrate all volumes from a datastore, use the --source-dc and --source-ds parameters instead of this parameter.

    dest-dc-name

    Enter the name of the data center that contains the datastore to which you want to migrate volumes.

    dest-ds-name

    Enter the name of the datastore to which you want to migrate volumes.

    --ignore-storage-policy

    Include this parameter to migrate volumes to the target datastore even if the datastore does not comply with the storage policy of the volume.

Results

The specified volumes are migrated to the target datastore.