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 desstination project acccepts the transfer using the authentication key.
  • The volume is attached to the VM in the destination project

Let's go !

Authenticating against the source project, create the transfer request

taylor@laptop:~$ openstack volume transfer request create testvol
+------------+--------------------------------------+
| Field      | Value                                |
+------------+--------------------------------------+
| auth_key   | 55ada5284805dbca                     |
| created_at | 2021-02-26T13:45:08.498392           |
| id         | 4157e983-a738-4ca8-8f7b-2542240c0681 |
| name       | None                                 |
| volume_id  | 71bd47d8-b51e-4f12-9c51-0445fc36c9e4 |
+------------+--------------------------------------+

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.

taylor@laptop:~$ openstack volume transfer request list
+--------------------------------------+------+--------------------------------------+
| ID                                   | Name | Volume                               |
+--------------------------------------+------+--------------------------------------+
| 4157e983-a738-4ca8-8f7b-2542240c0681 | None | 71bd47d8-b51e-4f12-9c51-0445fc36c9e4 |
+--------------------------------------+------+--------------------------------------+
$ openstack volume show my-volume
root@26KQ973-pub1-controller-1>_ ~ # openstack volume show testvol
+--------------------------------+--------------------------------------------+
| Field                          | Value                                      |
+--------------------------------+--------------------------------------------+
[...]
| status                         | awaiting-transfer                          |
[...]
+--------------------------------+--------------------------------------------+

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

taylor@laptop:~$ openstack volume transfer request accept --auth-key 55ada5284805dbca 4157e983-a738-4ca8-8f7b-2542240c0681
+-----------+--------------------------------------+
| Field     | Value                                |
+-----------+--------------------------------------+
| id        | 4157e983-a738-4ca8-8f7b-2542240c0681 |
| name      | None                                 |
| volume_id | 71bd47d8-b51e-4f12-9c51-0445fc36c9e4 |
+-----------+--------------------------------------+
And the results confirmed in the volume list for the destination project.

taylor@laptop:~$ openstack volume list
+--------------------------------------+---------+-----------+------+-------------+
| ID                                   | Name    | Status    | Size | Attached to |
+--------------------------------------+---------+-----------+------+-------------+
| 71bd47d8-b51e-4f12-9c51-0445fc36c9e4 | testvol | available |  200 |             |
+--------------------------------------+---------+-----------+------+-------------+
Back to top