Volumes are additional disk space you may create, attach and detach to and from virtual machines.
1. Create and attach a volume¶
Here you may create and attach a new volume. For more information, please see below.
Here you may set how many volumes you want to see per page and scroll through the pages.
Here you may filter your list of volumes. In the text field you may filter by volume name, volume openstackid, project name and virtual machine name.
Here you will find some actions which will be run on all volumes selected by the checkbox you will find at the right of each volume. Also you may choose to select all volumes by clicking 'Select all'.
Here you will find some information regarding the volume: the project it belongs to, the virtual machine it is attached to, the name of the volume, the status of the volume and the storage size.
Here you will find some actions you can execute:
- Attach volume: attaches an available volume to an existing virtual machine.
- Detach volume: detaches an in-use volume from an existing virtual machine.
- Extend volume: extends the size of the volume if your project has enough ressources left. For more information, please see below.
- Delete volume: deletes the volume and all its data.
Create a volume¶
There are two ways to create a volume:
When starting a virtual machine you can choose to start a volume, see the respective wiki page. The volume is automatically mounted this way.
At the Volume tab you can choose to create a volume.
In order to use the Volume you need to mount it.
Mount a volume¶
In order to mount a volume connect via ssh to your machine. You will find your volume with the command
This command will list all your block devices connected to your VM. Chose the correct device (mostly the name will be the second entry, you can orientate oneself on the SIZE parameter) and format it with a filesystem if you are using this volume for the first time. Common filesystems are ext4 or xfs.
After the formating you have to create a mountpoint
mkdir -p /vol/volume
Check that you have the correct permissions for this directory, otherwise set them with the follwoing command
chmod 777 /vol/volume
And mount the Cinder Volume under the created directory
mount /dev/device_name /vol/volume
Now you should see your device by executing the command
If you do not need you Cinder Volume you can also unmount it with
Extend a volume¶
If you have a volume and want to increase the volume size, you can do this at the volume overview.
Volume must be available
The volume must be detached from any virtual machine!
After you have extended your volume you need to attach the volume to your vm. Depending on which filesystem you use on your volume there are different procedures necessary to make the new capacity available.
XFS formatted filesystem¶
Mount the volume as usual and run the following command
sudo xfs_growfs -d <MOUNTPOINT>
Ext4 formatted filesystem¶
Do not mount the volume. If you can see it with:
Run the following command to increase the capacity:
sudo resize2fs </dev/device_name>
Another formatted filesystem¶
If you use another filesystem than xfs or ext4 please look up if and how an increase of the capacity is possible.