Member-only story

Going deeper on Ceph-Based Storage Classes

DaeGon Kim
4 min readApr 9, 2024

In a previous article, we cover steps for setting up rook-ceph Kubernetes RBD and CephFS provisioner. In this article, we will take a deeper look at how they works.

RBD-based Storage Class

The steps for a rbd storage class in the previous article are creating a rbd pool and a user, then granting access permissions to the rbd pool to the user. This information is given to the storage class specification.

When a PVC (Persistent Volume Claim) is created with this storage class, the a PV (Persistent Volume) will be created. A rbd image will be created in the rbd pool.

To see the persistent volumes, we can use rbd ls commands.

# rbd -p [pool name] ls
sudo rbd -p [k8s-rbd-pool] ls

To see the actual usage, we can use rdb du command on the pool.

rbd du command and its output

In order to avoid the warning we can enable fast-diff by adding it in imageFeatures in the RBD storage class specification. To enable it, we need to enable object-map and exclusive-lock as well. The final spec would be like this.

  imageFeatures: layering,fast-diff,object-map,exclusive-lock

When we delete a Kubernetes cluster, we can run these two commands to clean up its persistent volumes. This will delete all the…

--

--

No responses yet