Member-only story

Ceph : Adding/Removing Monitors

DaeGon Kim
2 min readFeb 15, 2023

--

In our deployment, we have only one monitor node. Although it is easy to set up and does not require a lot of resource, it is not ideal for network file system.

In this article, we will add and remove monitors. First, I tried to follow the manual steps for the Ceph document on adding/removing monitor. It did not work. Then, I used ceph orch command.

Preparing nodes

First we need to prepare a node to be added.

  1. Install a docker
  2. Add /etc/ceph/ceph.pub to /root/.ssh/authorized_keys

Adding monitors / managers

sudo ceph orch host add experiment-ceph-mon1 172.29.65.20
sudo ceph orch apply mon --placement="2 experiment-ceph-mon experiment-ceph-mon1"

This sequence of commands will launch another monitor node. We can add a secondary manager (mgr daemon) in the same way.

sudo ceph orch apply mgr --placement="2 experiment-ceph-mon1 experiment-ceph-mon"

The number in the placement is the number of mon/mgr daemon. The Ceph cluster will launch requested daemons. You can check the status with the following commands.

sudo ceph orch ls
sudo ceph orch ps
sudo ceph status

Deleting monitors / managers

Deleting a monitor is not as simple as adding one. We can run the ceph orch apply mon command like below.

--

--

No responses yet