Failure to re-attach a volume to an instance may result from incomplete "cleanup" of the previously detached volume. This means that certain properties of the preceding attachment were not removed, such as the volume device name.
Incomplete cleanup could cause the detached volume to retain its previously assigned name, such as
vdd. To correct the issue, try running the
openstack server add volume command without specifying a volume device name. The compute service will automatically assign the next available name.
openstack server add volume <INSTANCE_UUID> <volume_UUID>
TIP: To get the instance ID via the CLI, run
openstack server list. The command returns a list of instances, each with an ID. To get the ID via the Dashboard, click Instances in the Project drop-down list, and then click the desired instance to see its Overview tab. The ID appears in the INFO section.
TIP: To get the volume ID via the CLI, use
openstack volume list. The command returns a list of volumes, each with an ID. To get the ID via the Dashboard, click Volumes in the Project tab, and then click the desired volume to see its Overview tab. The ID appears in the INFO section.
To verify the success of the command, run
openstack volume list. The command returns a list of created volumes, each with a status and attached instance, if applicable. The status of your newly attached volume should be active, and it should be attached to the instance you specified.
If you are still unable to re-attach a volume to an instance successfully, try restarting KVM. Contact Metacloud Support for assistance with this action.