1
- ==================================================
2
- Reconfigure a Replica Set with Unavailable Members
3
- ==================================================
1
+ ===============================================
2
+ Reconfigure a Replica Set when Members are Down
3
+ ===============================================
4
4
5
5
.. default-domain:: mongodb
6
6
7
- To reconfigure a :term:`replica set` when a **majority** of members
8
- are accessible, use the :method:`rs.reconfig()` operation on
7
+ To reconfigure a :term:`replica set` when a only a **minority** of
8
+ members have become inaccessible, use the :method:`rs.reconfig()`
9
+ operation on
9
10
the current :term:`primary`, following the example in the
10
11
:ref:`Replica Set Reconfiguration Procedure
11
12
<replica-set-reconfiguration-usage>`.
12
13
13
- To reconfigure a replica set when a **minority** of members are
14
- accessible, the reconfiguration process is less straightforward. Use
15
- the procedure in this document, to reconfigure a replica set in this
16
- situation. For example, you will need to use this process to
17
- reconfigure a set split between multiple facilities where *no* local
18
- group of nodes can reach a majority. See
14
+ To reconfigure a replica set when a **majority** of members have become
15
+ inaccessible, use one of the procedures in this document. This situation
16
+ might occur, for example, in a replica set is distributed across
17
+ multiple facilities and *no* local group of members can reach a
18
+ majority. See
19
19
:ref:`replica-set-elections-and-network-partitions` for more
20
- information about these case. In these situations, *always* use the
21
- procedures described in this document.
20
+ information on this situation.
21
+
22
+ This document provides the following options for reconfiguring a replica
23
+ set when a **majority** of members are accessible:
24
+
25
+ - :ref:`replica-set-force-reconfiguration`
26
+ - :ref:`replica-set-reconfigure-by-replacing`
22
27
23
28
.. index:: replica set; reconfiguration
24
29
.. _replica-set-force-reconfiguration:
@@ -30,13 +35,12 @@ Reconfigure by Forcing the Reconfiguration
30
35
31
36
This procedure lets you recover while a majority of :term:`replica set`
32
37
members are down or unreachable. You connect to any surviving member and
33
- use the ``force`` option to the :method:`rs.reconfig()` method to force a
34
- reconfiguration of the replica set.
38
+ use the ``force`` option to the :method:`rs.reconfig()` method.
35
39
36
- The ``force`` option reconfigures the set. Only use this procure to
40
+ The ``force`` option forces reconfiguration of the set. Use this procedure only to
37
41
recover from catastrophic interruptions. Do not use ``force`` every
38
42
time you reconfigure. Also, do not use ``force`` in any automatic
39
- scripts and do not use ``force`` when there is still a primary.
43
+ scripts and do not use ``force`` when there is still a :term:` primary` .
40
44
41
45
To force reconfiguration:
42
46
@@ -81,10 +85,12 @@ To force reconfiguration:
81
85
#. If the failure or partition was only temporary, shut down or
82
86
decommission the removed members as soon as possible.
83
87
88
+ .. _replica-set-reconfigure-by-replacing:
89
+
84
90
Reconfigure by Replacing the Replica Set
85
91
----------------------------------------
86
92
87
- Only use the following procedure for versions of MongoDB before
93
+ Use the following procedure **only** for versions of MongoDB prior to
88
94
version 2.0. If you're running MongoDB 2.0 or later, use the above
89
95
procedure, :ref:`replica-set-force-reconfiguration`.
90
96
@@ -103,9 +109,9 @@ Reconfigure by Turning Off Replication
103
109
104
110
This option replaces the :term:`replica set` with a :term:`standalone` server.
105
111
106
- 1. Stop the surviving :program:`mongod` instances. Use existing
107
- an :term:`control script`, or an invocation that resembles the
108
- following to ensure a clean shutdown :
112
+ 1. Stop the surviving :program:`mongod` instances. To ensure a clean shutdown, use
113
+ an existing :term:`control script` or an invocation that resembles the
114
+ following:
109
115
110
116
.. code-block:: javascript
111
117
@@ -121,7 +127,7 @@ This option replaces the :term:`replica set` with a :term:`standalone` server.
121
127
122
128
mv /data/db /data/db-old
123
129
124
- .. optional:: If you have a backup of the database you may remove
130
+ .. optional:: If you have a backup of the database you may instead remove
125
131
this data.
126
132
127
133
#. Restart one of the :program:`mongod` instances *without* the
@@ -137,9 +143,9 @@ This option selects a surviving :term:`replica set` member to be the new
137
143
:term:`primary` and to "seed" a new replica set. All other
138
144
members must resync from this new primary.
139
145
140
- 1. Stop the surviving :program:`mongod` instances. Use existing
141
- an :term:`control script`, or an invocation that resembles the
142
- following to ensure a clean shutdown :
146
+ 1. Stop the surviving :program:`mongod` instances. To ensure a clean shutdown, use
147
+ an existing :term:`control script` or an invocation that resembles the
148
+ following:
143
149
144
150
.. code-block:: javascript
145
151
@@ -155,16 +161,16 @@ members must resync from this new primary.
155
161
156
162
mv /data/db /data/db-old
157
163
158
- .. optional:: If you have a backup of the database you may remove
164
+ .. optional:: If you have a backup of the database you may instead remove
159
165
this data.
160
166
161
167
#. Restart all :program:`mongod` instances with a new replica set
162
- name. If the old set name was ``rs0``, the invoke :program:`mongod`
163
- instances with the following command line arguments :
168
+ name. For example, if the old set name was ``rs0``, you might invoke the :program:`mongod`
169
+ instances with the following command line argument :
164
170
165
171
.. code-block:: sh
166
172
167
- mongo --replSet rs1
173
+ --replSet rs1
168
174
169
175
See :setting:`replSet` and :option:`--replSet <mongod --replSet>`
170
176
for more information.
0 commit comments