Work with Volumes
Volume Types
The below table shows Quality of Service details related to available volume types. Note that high-performance
volume type is available on demand, please get in touch with support to make it available.
Volume Type Name | QoS Association | QoS Details |
---|---|---|
standard | 300IOPS-250MBps | total_bytes_sec='262144000', total_bytes_sec_max='524288000', total_iops_sec='300', total_iops_sec_max='600' |
perfomance | 1000IOPS-500MBps | total_bytes_sec='524288000', total_bytes_sec_max='1048576000', total_iops_sec='1000', total_iops_sec_max='2000' |
high-perfomance | 5000IOPS-1000MBps | total_bytes_sec='1048576000', total_bytes_sec_max='2097152000', total_iops_sec='5000', total_iops_sec_max='10000' |
Create a Volume
- Navigate to Project > Volumes > Volumes and click Create Volume.
-
In the popup window that appears, enter or select the following values and afterwards click Create Volume.
- Volume Name: Specify a name for the volume.
- Description: Optionally, provide a brief description for the volume
- Volume Source: Select one of the options below.
No source, empty volume
: Creates an empty volume. An empty volume does not contain a file system or a partition table.Snapshot
: If you choose this option, a new field for Use snapshot as a source displays. You can select the snapshot from the list.Image
: If you choose this option, a new field for Use image as a source displays. You can select the image from the list.Volume
: If you choose this option, a new field for Use volume as a source displays. You can select the volume from the list. Options to use a snapshot or a volume as the source for a volume are displayed only if there are existing snapshots or volumes. Volumes must not be attached to an instance to be available.
- Type: The type you choose affects the performance of your volume.
- Size (GiB): The size of the volume in gibibytes (GiB).
- Availability Zone: Only
nova
zone is available. - Group: ignore this field.
-
Verify that the newly created Volume is listed under Project > Volumes > Volumes and its Status is
Available
.
Volume Source Options:
-
No Source (Empty Volume)
:- Creates a blank volume with no pre-existing data.
- Ideal for use cases where you plan to format or set up the volume from scratch after creation.
-
Snapshot
:- Creates a volume from an existing volume snapshot. Read more about Volume Snapshots.
- Useful for restoring data to a specific point in time or duplicating a volume's contents for testing or scaling purposes.
-
Image
:- Initializes the volume with an operating system or application image.
- Typically used to boot instances from the volume directly or to ensure a specific environment setup.
-
Volume
:- Clones an existing volume to create an identical copy.
- Suitable for replicating data or quickly provisioning a new volume with the same contents as another.
Create a volume using the below command:
openstack volume create <volume_name> \
--size <size_in_GiB> \
--description "<description>" \
--type <volume_type> \
--snapshot <snapshot_id> \
--image <image_id> \
--source <source_volume_id>
Explanation:
- Use
--snapshot
when creating a volume using snapshot as a source. - Use
--image
when creating a volume using image as a source. - Use
--source
when creating a volume using existing volume as a source. - If you don't use any of the 3 above parameters you will create an empty volume.
- When using
--snapshot
you can still modify the size, description and type of the volume using the relevant parameters.
Volume Source Options:
-
No Source (Empty Volume)
:- Creates a blank volume with no pre-existing data.
- Ideal for use cases where you plan to format or set up the volume from scratch after creation.
-
Snapshot
:- Creates a volume from an existing volume snapshot. Read more about Volume Snapshots.
- Useful for restoring data to a specific point in time or duplicating a volume's contents for testing or scaling purposes.
-
Image
:- Initializes the volume with an operating system or application image.
- Typically used to boot instances from the volume directly or to ensure a specific environment setup.
-
Volume
:- Clones an existing volume to create an identical copy.
- Suitable for replicating data or quickly provisioning a new volume with the same contents as another.
Example output
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2024-11-10T15:36:04.220339 |
| description | my-description |
| encrypted | False |
| id | eed005d2-1583-48aa-93eb-af78e9081d99 |
| multiattach | False |
| name | empty-volume |
| properties | |
| replication_status | None |
| size | 10 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| type | standard |
| updated_at | None |
| user_id | 43bb91a04c174ef6af8857a205768f20 |
+---------------------+--------------------------------------+
Verify the volume status by listing the volumes:
Example output
+--------------------------------------+--------------+-----------+------+-------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| eed005d2-1583-48aa-93eb-af78e9081d99 | empty-volume | available | 10 | |
+--------------------------------------+--------------+-----------+------+-------------+
Attach a Volume
- Navigate to Project > Volumes > Volumes, locate the volume you want to attach and in the Actions column click Manage Attachments.
- In the popup window that appears select the instance and click Attach Volume.
- Verify the Status of the volume is
In-use
and the instance is visible in the Attached to column.
Attach a volume to an instance:
Example output
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| ID | eed005d2-1583-48aa-93eb-af78e9081d99 |
| Server ID | baceec24-7f97-4c2e-8270-bf28658936c1 |
| Volume ID | eed005d2-1583-48aa-93eb-af78e9081d99 |
| Device | /dev/sdd |
| Tag | None |
| Delete On Termination | False |
+-----------------------+--------------------------------------+
You can further verify with the below command. Look for status
: in-use
in the output and verify attachments
to confirm the volume is attached to the specified instance.
Detach a Volume
- Navigate to Project > Volumes > Volumes, locate the volume you want to detach and in the Actions column click Manage Attachments.
- In the pop-up window that appears click Detach Volume. Confirm it again, by clicking Detach Volume in the next popup window.
- Verify the Status of the volume is
Available
and the instance is not visible in the Attached to column.
Important
The root volume cannot be detached.
Detach a volume from an instance (no output if successful):
Verify the volume is detached. Look for status
: available
in the output and verify attachments
field is empty.
Delete a Volume
- Navigate to Project > Volumes > Volumes, locate the volume you want to delete and in the Actions column click Delete Volume. Confirm it again, by clicking Delete Volume in the next popup window.
- Verify the volume is not listed anymore in Project > Volumes > Volumes.
Transfer a Volume
In OpenStack, the volume transfer feature allows you to transfer ownership of a volume from one project to another within the same cloud region. Here is how it works:
- Navigate to Project > Volumes > Volumes, locate the volume you want to transfer and in the Actions column click the Create Transfer.
- In the popup window that appears fill in the Transfer Name and click Create Volume Transfer.
- In the next step download the transfer credentials by clicking the relevant button.
- Notice the Status of the volume is now
Awaiting Transfer
. You canCancel Transfer
by clicking the relevant button in the Actions column. - Now you can share the transfer credentials with the recipient. The recipient can accept the transfer by navigating to Project > Volumes > Volumes, clicking Accept Transfer, and entering the transfer credentials.
- The volume is now fully transferred to the recipient’s project. It will appear under the recipient’s list of volumes and no longer be accessible from the original owner's project.
Create a transfer request. This will generate a transfer ID and an authorization key required for the recipient to accept the transfer:
Example output
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| auth_key | ed737401b6983c82 |
| created_at | 2024-11-10T16:18:46.737034 |
| id | 1c0331cc-d1a5-49ca-a802-bc1ebd5e21da |
| name | my-transfer |
| volume_id | eed005d2-1583-48aa-93eb-af78e9081d99 |
+------------+--------------------------------------+
After creating the transfer, note thetransfer_id
and auth_key
from the output, as these are required for the recipient to accept the transfer.
The volume status will change to awaiting-transfer
. You can cancel the transfer, if necessary, by running the below command (no output if successful):
The recipient can accept the transfer using the credentials provided (no output if succesful):
The recipent can now verify the transfer by listing volumes: