]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | ===================== |
2 | Add/Remove Monitors | |
3 | ===================== | |
4 | ||
5 | With ``ceph-deploy``, adding and removing monitors is a simple task. You just | |
6 | add 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 | |
8 | numerous manual steps. Using ``ceph-deploy`` imposes a restriction: **you may | |
9 | only 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 | ||
14 | For high availability, you should run a production Ceph cluster with **AT | |
15 | LEAST** three monitors. Ceph uses the Paxos algorithm, which requires a | |
16 | consensus among the majority of monitors in a quorum. With Paxos, the monitors | |
17 | cannot determine a majority for establishing a quorum with only two monitors. A | |
18 | majority of monitors must be counted as such: 1:1, 2:3, 3:4, 3:5, 4:6, etc. | |
19 | ||
20 | See `Monitor Config Reference`_ for details on configuring monitors. | |
21 | ||
22 | ||
23 | Add a Monitor | |
24 | ============= | |
25 | ||
26 | Once you create a cluster and install Ceph packages to the monitor host(s), you | |
27 | may deploy the monitor(s) to the monitor host(s). When using ``ceph-deploy``, | |
28 | the 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 | ||
41 | Remove a Monitor | |
42 | ================ | |
43 | ||
44 | If you have a monitor in your cluster that you'd like to remove, you may use | |
45 | the ``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 |