Command-line

Once correctly authenticated to Keystone - perform the following commands to create a basic Cinder volume.

To create a block storage volume, we need a few basic but important details -

Setting Description
--size Provide the required block storage volume size in GB
--description Provide a short description detailing the use for the volume, optionally include a username
name Include the name of the block storage volume at the end of the command, e.g. refdata01
[wflinstone@login1(demo) ~]$ openstack volume create \
> --size 5 \
> --description "Reference data for compute job" \
> refdata01
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| attachments         | []                                   |
| availability_zone   | nova                                 |
| bootable            | false                                |
| created_at          | 2015-12-10T15:21:35.577447           |
| display_description | Reference data for compute job       |
| display_name        | refdata01                            |
| encrypted           | False                                |
| id                  | e264d2a7-9666-481a-9a30-5d31d1408d93 |
| multiattach         | false                                |
| properties          |                                      |
| size                | 5                                    |
| snapshot_id         | None                                 |
| source_volid        | None                                 |
| status              | creating                             |
| type                | None                                 |
+---------------------+--------------------------------------+

View block storage volumes

View your newly created block storage volume together with other previously created volumes:

[wflinstone@login1(demo) ~]$ openstack volume list
+--------------------------------------+--------------+-----------+------+-------------+
| ID                                   | Display Name | Status    | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| c9630363-0134-455e-aa81-8cc2b69a4950 | refdata04    | available |    1 |             |
| bf6071db-4e60-49aa-b576-80a8d3b8fd0e | refdata03    | available |    1 |             |
| 2cdda4d7-300d-4bfe-9bb2-f9c8fe0429b5 | refdata02    | available |    1 |             |
| e264d2a7-9666-481a-9a30-5d31d1408d93 | refdata01    | available |    5 |             |
+--------------------------------------+--------------+-----------+------+-------------+