Skip to main content

Storage – RBD (Ceph)

NetActuate RBD (Ceph) provides tenant-isolated block storage that can be used either:

  1. Directly on a VM (map + mount an RBD image), or
  2. Through Kubernetes using the Ceph CSI RBD driver (rbd.csi.ceph.com).

Before you start, replace placeholders like <TENANT_ID>, <CLUSTER_ID>, <MON1>, and <YOUR_SECRET_KEY> with your real values.

VM Access (Ceph RBD Block Storage)

What you need

ItemNotes / example
Ceph monitorsmon_host = <MON1>,<MON2>,<MON3>
Ceph user IDvolume-client-<TENANT_ID>
Ceph user key<YOUR_SECRET_KEY>
RADOS namespacevolume-namespace-<TENANT_ID>
Poolglobal-block-pool
Image/volume nameimage-<TENANT_ID> (or the volume name you were issued)

Install required packages

Install the Ceph client tools on your VM:

sudo apt update
sudo apt install ceph ceph-common -y

Authentication

Create a keyring file with your key:

sudo tee /etc/ceph/ceph.volume-client-<TENANT_ID>.keyring <<'EOF'
[volume-client-<TENANT_ID>]
key = <YOUR_SECRET_KEY>
EOF
sudo chmod 600 /etc/ceph/ceph.volume-client-<TENANT_ID>.keyring

Create /etc/ceph/ceph.conf with monitor addresses:

sudo tee /etc/ceph/ceph.conf <<'EOF'
[global]
mon_host = <MON1>,<MON2>,<MON3>
EOF

Map and mount the RBD volume

Map the RBD image to the host:

sudo rbd map volume-namespace-<TENANT_ID>/image-<TENANT_ID> \
--pool global-block-pool \
--id volume-client-<TENANT_ID> \
--keyring /etc/ceph/ceph.volume-client-<TENANT_ID>.keyring

Format the device (first time only):

sudo mkfs.ext4 /dev/rbd/global-block-pool/volume-namespace-<TENANT_ID>/image-<TENANT_ID>

Create a mount point and mount it:

sudo mkdir -p /mnt/rbd
sudo mount /dev/rbd/global-block-pool/volume-namespace-<TENANT_ID>/image-<TENANT_ID> /mnt/rbd

Make it persistent across reboots:

echo "/dev/rbd/global-block-pool/volume-namespace-<TENANT_ID>/image-<TENANT_ID> /mnt/rbd ext4 defaults 0 0" | sudo tee -a /etc/fstab

Key points

All block volumes live in the global-block-pool pool. Tenant isolation is enforced by your issued Ceph user and namespace scoping.


Need Help?

For guidance on complex setups, connect with a NetActuate infrastructure expert at support@netactuate.com or open a support ticket from the portal: portal.netactuate.com.