Add/Remove Monitors

With ceph-deploy, adding and removing monitors is a simple task. You justadd or remove one or more monitors on the command line with one command. Beforeceph-deploy, the process of adding and removing monitors involvednumerous manual steps. Using ceph-deploy imposes a restriction: you mayonly install one monitor per host.

Note

We do not recommend commingling monitors and OSDs onthe same host.

For high availability, you should run a production Ceph cluster with ATLEAST three monitors. Ceph uses the Paxos algorithm, which requires aconsensus among the majority of monitors in a quorum. With Paxos, the monitorscannot determine a majority for establishing a quorum with only two monitors. Amajority of monitors must be counted as such: 1:1, 2:3, 3:4, 3:5, 4:6, etc.

See Monitor Config Reference for details on configuring monitors.

Add a Monitor

Once you create a cluster and install Ceph packages to the monitor host(s), youmay deploy the monitor(s) to the monitor host(s). When using ceph-deploy,the tool enforces a single monitor per host.

  1. ceph-deploy mon create {host-name [host-name]...}

Note

Ensure that you add monitors such that they may arrive at a consensusamong a majority of monitors, otherwise other steps (like ceph-deploy gatherkeys)will fail.

Note

When adding a monitor on a host that was not in hosts initially definedwith the ceph-deploy new command, a public network statement needsto be added to the ceph.conf file.

Remove a Monitor

If you have a monitor in your cluster that you’d like to remove, you may usethe destroy option.

  1. ceph-deploy mon destroy {host-name [host-name]...}

Note

Ensure that if you remove a monitor, the remaining monitors will beable to establish a consensus. If that is not possible, consider adding amonitor before removing the monitor you would like to take offline.