Create Volume
Volumes are block storage devices that you attach to instances to enable persistent storage. You can attach a volume to a running instance or detach a volume and attach it to another instance at any time. You can also create a snapshot from or delete a volume.
#
RequirementsThe full documentation can be found on the openstack website
#
Create Volume commandopenstack volume create [--size <size>] [--type <volume-type>] [--image <image> | --snapshot <snapshot> | --source <volume> | --source-replicated <replicated-volume>] [--description <description>] [--user <user>] [--project <project>] [--availability-zone <availability-zone>] [--consistency-group <consistency-group>] [--property <key=value> [...] ] [--hint <key=value> [...] ] [--multi-attach] [--bootable | --non-bootable] [--read-only | --read-write] <name>
All parameters are explained here #create-volume
#
CreateWe will create a volume with the size of 100 GB and the NVMe type(it is also possible to create HDD volumes)
openstack volume create \ --size 100 \ --type NVMe \ volume-nvme-100gb
The output shows that the volume is in creation status+---------------------+--------------------------------------+| Field | Value |+---------------------+--------------------------------------+| attachments | [] || availability_zone | nova || bootable | false || consistencygroup_id | None || created_at | 2021-09-29T12:14:16.000000 || description | None || encrypted | False || id | 761c0e3e-ad82-48a7-9b76-34c70c46dd96 || multiattach | False || name | volume-nvme-100gb || properties | || replication_status | None || size | 100 || snapshot_id | None || source_volid | None || status | creating || type | NVMe || updated_at | None || user_id | 063459e21cd4432e86cf376c34e2b9ed |+---------------------+--------------------------------------+
#
List volumesopenstack volume list
+--------------------------------------+-------------------+-----------+------+--------------+| ID | Name | Status | Size | Attached to |+--------------------------------------+-------------------+-----------+------+--------------+| 761c0e3e-ad82-48a7-9b76-34c70c46dd96 | volume-nvme-100gb | available | 100 | |...
You now have a volume that can be attached to a server.
The volume will appear in the Cloudify.ro dashboard within minutes of creation.