Block Storage
Overview
Block Storage Service is built on the OpenStack Cinder project. With the Block Storage Service it is possible to add additional persistent block storage to your compute instances. You can manage your Block Storage volumes and make them available to your compute instances both via our public OpenStack API endpoints, as well as using the Horizon Dashboard and the OpenStack CLI.
Available Volume Types
| Volume type | CBK region | DBL region | FES region |
|---|---|---|---|
| quobyte | Yes (default) | Yes (default) | No |
| quobyte-multiattach | Yes | Yes | No |
| ceph | No | No | Yes (default) |
quobyte
The data will be stored on SSDs in the OpenStack Cloud distributed storage cluster based on Quobyte. The data will be replicated and stored on three different storage nodes and SSDs. A volume can only be attached to a single virtual machine at a time.
quobyte-multiattach
This volume type is the same as the quobyte volume type, except that the volumes can be attached to multiple VMs at the same time.
The performance of quobyte-multiattach is slightly reduced because some caching strategies are not possible with multi-attach volumes. There is also a performance penalty using ocfs2 (or any other cluster file system, like gfs2) compared to ext4, because the file system must coordinate with the other nodes over the network.
Please refer to our multi-attach volume tutorial. It explains how to use multi-attach volumes with the cluster file system ocfs2.
Warning
This mode of operation requires special cluster file systems like ocfs2 or gfs2. Otherwise it can lead to the loss of data and/or file system and data corruption.
Ceph
The data will be stored on SSDs in the OpenStack Cloud distributed storage cluster based on Ceph. The data will be replicated and stored on three different storage nodes and SSDs. A volume can only be attached to a single virtual machine at a time.
Available Functionality
| OpenStack Cinder Feature | CBK region | DBL region | FES region |
|---|---|---|---|
| Block storage volumes | Yes | Yes | Yes |
| Volume transfer | Yes | Yes | Yes |
| Volume snapshots | Yes (offline*) | Yes (offline*) | Yes (offline*) |
| Save volume as glance image | Yes (offline*) | Yes (offline*) | Yes (offline*) |
| Multi-attach volumes | Yes | Yes | No |
| Volume resizing | Yes (offline*) | Yes (offline*) | Yes (offline*) |
| Volume backups | No | No | No |
| Encryption at rest | No | No | Yes |
- offline means, that this functionality is only supported for volumes that are not attached to a virtual machine.
Block Storage Volumes
The OpenStack Cinder service allows end users to manage virtual block storage devices. Via a self service API it provides the functionality to create volumes for persistent storage and attach them to virtual machines. A volume can be moved from one VM to another by detaching it and re-attaching it somewhere else. Also you may delete or rebuild a VM without losing its data that is kept on a Cinder volume.
Inside the virtual machine the volume will be available as a block device (for example on Linux operating systems as /dev/vdX). It might be necessary to format the device with the file system of your choice.
Volume Transfer
Volume transfers allow you to transfer ownership of a volume to a different OpenStack project.
The transfer can be initiated in one project using openstack volume transfer request create, and then completed using openstack volume transfer request accept.
Volume Snapshots
A snapshot saves a point-in-time copy of a block storage volume.
Snapshots can only be created while the volume is detached. The option --force to create a snapshot from an attached volume is currently not supported and may lead to a snapshot in ERROR state. Boot volumes cannot be detached (not even while the instance is shut down).
You may use the snapshot as a source when creating a new volume:
Once you have a snapshot and are ready to remove it, you can delete it with the following command:
Important: A volume snapshot deletion cannot be performed while its source volume is attached or in use.
Before deleting the snapshot, ensure that the volume is detached from any instances. You can verify the volume's status with:
If the volume is attached, detach it first to avoid any issues. Deleting a snapshot is irreversible, so be sure that you no longer need the snapshot before proceeding.
Save volume as glance image
It is possible to copy the contents of a cinder volume to the glance image store, for example using the OpenStack CLI:
The cinder volume must be detached for the operation to succeed.
Multi-Attach Volumes
When you create a volume with a multi-attach volume type (See available volume types), it is possible to attach it to multiple virtual machines at the same time.
Warning
This mode of operation requires special cluster file systems like ocfs2 or gfs2. Otherwise it can lead to the loss of data and/or file system and data corruption.
This is useful, for example, to make app servers more scalable or to reduce single points of failure: If your application relies on a file system to store information, for example pictures, you can use multi-attach volumes to share the file system across several app servers, without the need for network storage solutions like NFS.
Please refer to our multi-attach volume tutorial. It explains how to use multi-attach volumes with the cluster file system ocfs2.
Your client must use the nova API version 2.60 or later for attaching / detaching the volume. In the OpenStack CLI you can accomplish this using the --os-compute-api-version parameter:
The necessary settings for Terraform are described in the Terraform documentation for multi-attach volume attachments.
Volume Resizing
Sometimes it is necessary to change the size of your volume.
Cinder volumes can be extended in size using the API or the OpenStack CLI:
Following the volume size change it might be necessary to grow the filesystem. If you are using ext4 you may need to run this command on the VM where the volume is attached:
Encryption at Rest
Encryption at rest is only supported in FES region. Data stored on a ceph volume is encrypted at rest, which means that data is encrypted before writing it to a physical device. When storage device is lost or damaged your data is protected against unauthorized access.
Warning
In case of local storage flavors, only data stored on a ceph volume is encrypted. Data stored on the VM's ephemeral local storage or on a quobyte volume is not encrypted. In any case data stored on a quobyte volume is not encrypted.
Current Limitations
- Online resizing is not supported. A volume must be detached, before it can be resized.
- Shrinking volumes is not supported. To reduce the size of your volume, create a new one and copy the data.
- The number of volumes that can be attached to a single instance is currently limited to 26 (root device + 25 more).