RBD

What is RBD

RBD (RADOS Block Device) is the way to go when you need a block device on a Linux machine. This includes QEMU hypervisors like Proxmox and OpenShift. There is also an experimental Windows driver.

Creating an RBD

To create an RBD, we need to create a RBD pool first.

  1. Navigate to Block Storage. If the cluster has no RBD pool yet, croit opens the Create RBD Pool wizard.
  2. In the RBD Pool step, review the replicated pool that holds your images.
  3. Optionally, tick Create a data pool in the Data Pool step to add an erasure coded pool for image data (see below).
  4. Optionally, create a first image in the Image step, or click Create Without Image.
  5. To add more images later, click Create on the Block Storage page.

Erasure Coding (EC)

If you want to store RBDs on an EC pool, you need an EC data pool next to the replicated RBD pool. Then during the RBD creation:

  1. Select the replicated RBD pool as your Pool.
  2. Tick Use a data pool and select the EC pool as your Data Pool, or pick New erasure coded pool... to create one.

Mounting the RBD

There are multiple ways to mount the RBD.

The Native Way

To mount your RBD on a Linux system you need to:

  1. Setup Ceph Keys.
  2. Download and move both ceph.conf and key to /etc/ceph/ on the system.
  3. Ensure the system has an up-to-date kernel, to prevent client bugs.
  4. Ensure the system has access to your MONs.
  5. Ensure the system has Ceph packages installed.
rbd device map $pool_name/$rbd_name --id $ceph_key_name
rbd device list
# Format the listed RBD
mkfs.xfs /dev/rbd0
mkdir /mnt/my-rbd
mount /dev/rbd0 /mnt/my-rbd

NVMe over Fabrics

RBD mirroring

Mirror RBD images to another cluster under Block Storage → Mirror: peers, rbd-mirror services and settings. The croit Datacenter Manager sets up both clusters in one step.

Hypervisors

RBDs can be directly utilized by QEMU-based hypervisors like: