Transferring Volumes

You can transfer a volume from one owner to another by using the CLI. The volume donor, or original owner, creates a transfer request and sends the created transfer ID and authorization key to the volume recipient. The volume recipient, or new owner, accepts the transfer by using the ID and key.

Note
Ownership of a volume can be transferred from one project to another (both the volume donor and recipient) within the same Availability Zone.

You can transfer a volume to perform the following:

  • Create a custom bootable volume or a volume with a large data set and transfer it to a user.

  • Complete bulk import of data to the cloud, the data ingress system creates a new Block Storage volume, copies data from the physical device, and transfers device ownership to a user.

To create a volume transfer request:

  1. List the available volumes.

    $ openstack volume list  
    | ID          | Display Name | Status    | Size | Attached to |
    |-------------|--------------|-----------|------|-------------|
    | <volume_id> | EXAMPLE1     | available |    3 |             |
    | <volume_id> | EXAMPLE2_    | available |    8 |             |
    | <volume_id> | EXAMPLE3     | available |   40 |             |
    | <volume_id> | EXAMPLE4     | available |   40 |             |
    
  2. Request a volume transfer authorization code for a specific volume.

    $ openstack volume transfer request create <VOLUME_ID>
    

    The volume must be in an available state or the request will be denied. If the transfer request is valid in the database (that is, it has not expired or been deleted), the volume is placed in an awaiting transfer state. For example:

    $ openstack volume transfer request create <TRANSFER_ID>
    

    The output shows the volume transfer ID in the id row and the authorization key.

  3. Specify a name for the transfer by using the --display-name <DISPLAY_NAME> parameter.

    |  Property  |  Value                       |
    |------------|------------------------------|
    | auth_key   |  <auth_key>                  |
    | created_at |  2013-10-14T15:20:10.121458  |
    | id         | <transfer_id>                |
    | name       | Transfer Example1            |
    | volume_id  | <volume_id>                  |
    

    Note
    While the auth_key property is visible in the output of openstack volume transfer request create <VOLUME_ID>, it will not be available in subsequent openstack volume transfer request show <TRANSFER_ID> commands.

  4. Send the volume transfer ID and authorization key to the new owner (for example, by email).

  5. View pending transfers.

    $ openstack volume transfer request list
    | ID            | VolumeID       | Name              |
    |---------------|----------------|-------------------|
    | <transfer_id> | <volume_id>    | Transfer Example1 |
    

    After the volume recipient, or new owner, accepts the transfer, the volume will not display in the transfer list.

To accept a volume transfer request:

  1. Obtain the transfer ID and authorization key from the original owner.

  2. Accept the request.

    $ openstack volume transfer request accept <TRANSFER_ID> <AUTH_KEY>
    | Property  | Value                      |
    |-----------|----------------------------|
    | id        | <transfer_id>              |
    | name      | Transfer Example1          |
    | volume_id | <volume_id>                |
    

    Note
    Servers must have enough space to accommodate the volume for the transfer to succeed. If you do not have adequate storage, the transfer is refused.

To delete a volume transfer:

  1. List available volumes and their statuses. Ensure the volume transfer you are deleting is awaiting-transfer.

    $ openstack volume list
    | ID          | Display Name | Status            | Size | Attached to |
    |-------------|--------------|-------------------|------|-------------|
    | <volume_id> | EXAMPLE1     | awaiting transfer |    3 |             |
    | <volume_id> | EXAMPLE2     | available         |    8 |             |
    | <volume_id> | EXAMPLE3     | available         |   40 |             |
    | <volume_id> | EXAMPLE4     | available         |   40 |             |
    
  2. Locate the matching transfer ID.

    $ openstack volume transfer request list
    | ID            | VolumeID      | Name              |
    |---------------|---------------|-------------------|
    | <transfer_id> | <volume_id>   | Transfer Example1 |
    
  3. Delete the volume.

    $ openstack volume transfer request delete <TRANSFER_ID>
    
  4. Verify that volume no longer displays on the transfer list. If there are no volumes awaiting transfer, the command return is blank.