Skip to content

Block storage

Block storage gives your instances persistent disks, managed by Cinder and backed by Ceph. A volume lives independently of any instance: you can detach it from one instance and attach it to another, and it survives the instance being deleted.

Storage tiers

Tier Use for
VOLUME-large General-purpose and bulk storage
VOLUME-fast NVMe-backed, for databases and latency-sensitive workloads

See the reference for pricing.

Create and attach a volume

openstack volume create --size 50 --type VOLUME-large data-disk
openstack server add volume my-instance data-disk

Inside the guest the volume appears as a new block device (for example /dev/vdb). Partition, format, and mount it as you would any disk:

sudo mkfs.ext4 /dev/vdb
sudo mkdir /data
sudo mount /dev/vdb /data

Add an /etc/fstab entry so it mounts on boot.

Boot from a volume

Booting from a volume makes the root disk persistent, which is required for b2.* flavors that have no local disk and useful whenever you want the instance's system disk to survive being rebuilt. See Launching instances.

Snapshots

A snapshot is a point-in-time copy of a volume, handy before a risky change:

openstack volume snapshot create --volume data-disk before-upgrade

You can create a new volume from a snapshot later. Snapshots live in the same Ceph cluster as the volume, so they are not a substitute for an off-platform backup. Block storage is not backed up by Sunet by default; see Durability, quotas and billing.

Resize a volume

Detach the volume, extend it, then re-attach and grow the filesystem inside the guest:

openstack server remove volume my-instance data-disk
openstack volume set --size 100 data-disk
openstack server add volume my-instance data-disk
# inside the guest, for an ext4 filesystem
sudo resize2fs /dev/vdb