Skip to content

Transferring volumes

Volumes are specific to a project and can only be attached to one virtual machine at a time.

There are mechanisms to transfer volumes between projects as detailed in the following steps.

The steps need to be performed as follows

  • The volume is detached from the VM in the source project and is available
  • The administrator of the source project marks the volume as being ready for transfer. This process generates an authentication key.
  • The authentication key has to be transmitted via a secure channel to the administrator of the destination project
  • The administrator of the destination project acccepts the transfer using the authentication key.
  • The volume is attached to the VM in the destination project

Authenticating against the source project, create the transfer request

$ openstack volume transfer request create my-volume
+------------+--------------------------------------+
| Field      | Value                                |
+------------+--------------------------------------+
| auth_key   | f3a792e69ea9bc2d                     |
| created_at | 2018-11-06T14:28:59.493092           |
| id         | ef3deca8-28c7-448d-bb98-3da60383eef4 |
| name       | None                                 |
| volume_id  | c0ff966e-6119-4bcf-87c5-2dc8f8a7d211 |
+------------+--------------------------------------+

The volume can be checked as in the transfer status using openstack volume transfer request list as follows and the volume is in status awaiting-transfer.

$ openstack volume transfer request list
+--------------------------------------+------+--------------------------------------+
| ID                                   | Name | Volume                               |
+--------------------------------------+------+--------------------------------------+
| ef3deca8-28c7-448d-bb98-3da60383eef4 | None | c0ff966e-6119-4bcf-87c5-2dc8f8a7d211 |
+--------------------------------------+------+--------------------------------------+
$ openstack volume show my-volume
+------------------------------+--------------------------------------+
| Field                        | Value                                |
+------------------------------+--------------------------------------+
<snip>
| name                         | my-volume                            |
| status                       | awaiting-transfer                    |
+------------------------------+--------------------------------------+

The administrator of the destination project should authenticate and receive the authentication key reported above. The transfer can then be initiated.

$ openstack volume transfer request accept --auth-key f3a792e69ea9bc2d ef3deca8-28c7-448d-bb98-3da60383eef4
+-----------+--------------------------------------+
| Field     | Value                                |
+-----------+--------------------------------------+
| id        | ef3deca8-28c7-448d-bb98-3da60383eef4 |
| name      | None                                 |
| volume_id | c0ff966e-6119-4bcf-87c5-2dc8f8a7d211 |
+-----------+--------------------------------------+

And the results confirmed in the volume list for the destination project.

$ openstack volume list
+--------------------------------------+----------------------------------------+-----------+------+-------------+
| ID                                   | Name                                   | Status    | Size | Attached to |
+--------------------------------------+----------------------------------------+-----------+------+-------------+
| c0ff966e-6119-4bcf-87c5-2dc8f8a7d211 | my-volume                              | available |    5 |             |
+--------------------------------------+----------------------------------------+-----------+------+-------------+