]> git.proxmox.com Git - ceph.git/blame - ceph/doc/rados/deployment/ceph-deploy-mon.rst
import 15.2.0 Octopus source
[ceph.git] / ceph / doc / rados / deployment / ceph-deploy-mon.rst
CommitLineData
7c673cae
FG
1=====================
2 Add/Remove Monitors
3=====================
4
5With ``ceph-deploy``, adding and removing monitors is a simple task. You just
6add or remove one or more monitors on the command line with one command. Before
7``ceph-deploy``, the process of `adding and removing monitors`_ involved
8numerous manual steps. Using ``ceph-deploy`` imposes a restriction: **you may
9only install one monitor per host.**
10
9f95a23c 11.. note:: We do not recommend commingling monitors and OSDs on
7c673cae
FG
12 the same host.
13
14For high availability, you should run a production Ceph cluster with **AT
15LEAST** three monitors. Ceph uses the Paxos algorithm, which requires a
16consensus among the majority of monitors in a quorum. With Paxos, the monitors
17cannot determine a majority for establishing a quorum with only two monitors. A
18majority of monitors must be counted as such: 1:1, 2:3, 3:4, 3:5, 4:6, etc.
19
20See `Monitor Config Reference`_ for details on configuring monitors.
21
22
23Add a Monitor
24=============
25
26Once you create a cluster and install Ceph packages to the monitor host(s), you
27may deploy the monitor(s) to the monitor host(s). When using ``ceph-deploy``,
28the tool enforces a single monitor per host. ::
29
30 ceph-deploy mon create {host-name [host-name]...}
31
32
33.. note:: Ensure that you add monitors such that they may arrive at a consensus
34 among a majority of monitors, otherwise other steps (like ``ceph-deploy gatherkeys``)
35 will fail.
36
37.. note:: When adding a monitor on a host that was not in hosts initially defined
38 with the ``ceph-deploy new`` command, a ``public network`` statement needs
39 to be added to the ceph.conf file.
40
41Remove a Monitor
42================
43
44If you have a monitor in your cluster that you'd like to remove, you may use
45the ``destroy`` option. ::
46
47 ceph-deploy mon destroy {host-name [host-name]...}
48
49
50.. note:: Ensure that if you remove a monitor, the remaining monitors will be
51 able to establish a consensus. If that is not possible, consider adding a
52 monitor before removing the monitor you would like to take offline.
53
54
55.. _adding and removing monitors: ../../operations/add-or-rm-mons
56.. _Monitor Config Reference: ../../configuration/mon-config-ref