Block storage (RBD)¶
Block storage gives you virtual disks backed by Ceph RBD. You do not talk to RBD directly. Instead you consume it through the platform that needs the disk:
- In OpenStack, as Cinder volumes attached to virtual machines.
- In a managed Kubernetes cluster, as persistent volumes requested by your workloads.
A block device behaves like a raw disk: it is mounted by a single client at a time, and you put a filesystem on it. If you need a filesystem that several machines mount at once, use CephFS instead.
Storage types¶
OpenStack exposes three Ceph RBD-backed volume types. A volume is
balanced unless you choose another type.
| Type | Disks | Protection | Use for |
|---|---|---|---|
fast |
NVMe | 3 copies | Latency-sensitive data such as databases |
balanced (default) |
NVMe | Erasure coded, 6+2 | General-purpose persistent disks |
bulk |
HDD | Erasure coded, 6+2 | Large data that is read and written in bulk |
Volumes created earlier with the type rbd1 (3 copies on NVMe) keep
working and will be moved to balanced by Sunet, with advance notice.
See Durability, quotas and billing for what the two
protection schemes mean.
Using block storage in OpenStack¶
Create a volume and attach it to an instance. From the command line:
Add --type bulk or --type fast to choose another type.
Then partition, format, and mount it inside the guest as you would any new disk. You can also boot an instance directly from a volume so that the root disk is persistent and survives the instance being deleted. See Block storage in OpenStack for the full walkthrough, snapshots, and resizing.
Using block storage in Kubernetes¶
Request a persistent volume with a PersistentVolumeClaim that names the
appropriate storage class. The volume is stored on one of the
storage types above, depending on the class, and is
attached to the node running your pod. See the Kubernetes
storage guide for the available storage
classes and examples.
Snapshots and backup¶
Volumes can be snapshotted for point-in-time copies, which is useful before a risky change. A snapshot lives in the same Ceph cluster as the volume, so it is not a backup against cluster-level loss or against deleting the volume and its snapshots together. Block storage is not backed up by Sunet by default. See Durability, quotas and billing.