Create Volume in Web Interface and CLI

Create Volume in Web Interface and CLI

You can create a new volume using either the Web Interface or the CLI. You can also create volume from a snapshot. A snapshot is a mechanism where you to create a new image from a running services which serves as a templating and backup mechanism.

Creating volume

Web Interface

  1. Log-in to the STFC cloud (https://openstack.stfc.ac.uk/auth/login/?next=/ )

  2. In the Web Interface, Go to Volumes -> Volumes

  3. Click on Create Volume

  4. Choose a name and size (in GiB),

    (Optional) you can select to create a volume from a snapshot in the volume source drop-down.

  5. After creation, you will see the volume in the list



Command-Line

Refer to Using the OpenStack Command Line Interface

Steps

Create simple volume

Run the following command in Terminal

openstack volume create --size <size-in-GiB> <name>
Create image from snapshot/image

Find the ID of your snapshot

$ openstack volume snapshot list +--------------------------------------+--------------------------------------+-------------+-----------+------+ | ID | Name | Description | Status | Size | +--------------------------------------+--------------------------------------+-------------+-----------+------+ | 76d51455-a5cd-478d-a93f-6e49b4108575 | testing-v-snapshot | None | available | 3 | +--------------------------------------+--------------------------------------+-------------+-----------+------+

Run the following command in Terminal

openstack volume create --snapshot <snapshot-id> --size <size> <name



$ openstack volume create --snapshot 76d51455-a5cd-478d-a93f-6e49b4108575 --size 3 test-cli-snapshot +---------------------+------------------------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------------------------+ | attachments | [] | | availability_zone | ceph | | bootable | false | | consistencygroup_id | None | | created_at | 2021-12-02T14:39:33.000000 | | description | None | | encrypted | False | | id | 2d61791d-5f52-46e1-81ac-05221c308fe8 | | multiattach | False | | name | test-cli-snapshot | | properties | | | replication_status | None | | size | 3 | | snapshot_id | 76d51455-a5cd-478d-a93f-6e49b4108575 | | source_volid | None | | status | creating | | type | __DEFAULT__ | | updated_at | None | | user_id | 3ae4ecf4b9e0e66260b7aaebc2cc98aac3c95221e42f1cb49113ed751d8b9f2c | +---------------------+------------------------------------------------------------------+