8.5. Creating a Volume

Compute instances support the attachment and detachment of Block Storage volumes. The procedure given below details the steps involved in creating a logical volume in the cinder-volumes volume group.
However, the volume service can optionally be configured to access multiple storage backends. The scheduler ensures that a unique instance of the volume service is launched to cater for each backend. If you wish to use multiple storage backends and do not want to rely on the scheduler, you can specify which backend your volumes are created on. However, you must then define a volume type in the database. For more information on configuring multiple back ends, see the section 'Configuring for Multiple Storage Backends' in the Installation and Configuration Guide at https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/4/html-single/Installation_and_Configuration_Guide/index.html#Configuring_for_Multiple_Storage_Backends
The procedure below details the steps involved in creating a logical volume in the cinder-volumes volume group using the cinder command line interface.

Procedure 8.3. Creating a Volume using the Command Line Interface

  1. Use the keystonerc_admin file to authenticate with the Identity service.
    $ source ~/keystonerc_admin
  2. Use the cinder create command to create a new volume.
    $ cinder create --display_name NAME SIZE
    Replace NAME with a name to identify your new volume and SIZE with the desired size for the new volume in gigabytes (GB).
You have successfully created a Block Storage volume using the command line interface.