Member-only story

Ceph Client Setup and RBD Snapshots

DaeGon Kim
3 min readNov 6, 2022

In a previous article, we created a Ceph user and granted rbd capabilities. In this article, we will go in detail how to use this user.

First, let’s check the health of the Ceph cluster.

sudo ceph health

As you can see below, the command does not work. To make it work, we need to specify a user and its keyring file.

Ceph health check with or without user and keyring

From now on, we will use this alias for a shortcut.

alias ceph-local="sudo ceph --id subplus -k ./subplus.keyring"

Now, here are various commands

ceph-local osd pool ls     # to list pools

To see the rbd images in pools, we can use rbd utility command.

sudo rbd -p sub-block-devices ls --id subplus -k ./subplus.keyring

Similarly, we will define an alias for the rbd command as well.

alias rbd-local="sudo rbd --id subplus -k ./subplus.keyring"

To see disk usage and info on a rbd image, use the following commands

ceph-local df
rbd-local info sub-block-devices/foo-clone

--

--

No responses yet