@@ -4,23 +4,26 @@ Convert a Secondary to an Arbiter
4
4
5
5
.. default-domain:: mongodb
6
6
7
- You can convert a secondary member to an arbiter either by shutting down
8
- the secondary and restarting it as an arbiter, or by starting the
9
- arbiter on a new port and then shutting down the instance of the
10
- secondary. This document describes both procedures.
7
+ If you have a :term:`secondary` in a :term:`replica set` that no
8
+ longer needs to hold a copy of the data *but* that you want to retain
9
+ in the set to ensure that the replica set will be able to :ref:`elect
10
+ a primary <replica-set-elections>`, you can convert the secondary into
11
+ an :ref:`arbiter <replica-set-arbiters>`. This document provides two
12
+ equivalent procedures for this process.
11
13
12
14
Synopsis
13
15
--------
14
16
15
- To convert a secondary to an arbiter you have two options:
17
+ Both of the following procedures are operationally equivalent. Choose
18
+ whichever procedure you are most comfortable with:
16
19
17
- #. Run the arbiter on the same port number as you ran the secondary.
18
- In this option , you must shut down the secondary and remove its data
20
+ #. You may operate the arbiter on the same port as the former secondary.
21
+ In this procedure , you must shut down the secondary and remove its data
19
22
before restarting and reconfiguring it as an arbiter.
20
23
21
24
For this procedure, see :ref:`replica-set-convert-secondary-to-arbiter-same-port`.
22
25
23
- #. Run the arbiter on a new port number . In this option , you can
26
+ #. Run the arbiter on a new port. In this procedure , you can
24
27
reconfigure the server as an arbiter before shutting down the
25
28
instance running as a secondary.
26
29
@@ -29,8 +32,8 @@ To convert a secondary to an arbiter you have two options:
29
32
.. seealso::
30
33
31
34
- :ref:`replica-set-arbiters`
32
- - :ref:`replica-set-arbiter-nodes`
33
35
- :method:`rs.addArb()`
36
+ - :doc:`/administration/replica-sets`
34
37
35
38
Procedures
36
39
----------
@@ -41,7 +44,7 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
41
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42
45
43
46
#. Remove the :term:`secondary` from the :term:`replica set` by calling
44
- the :method:`rs.remove()` method while connected to the current
47
+ the :method:`rs.remove()` method. Perform this operation while connected to the current
45
48
:term:`primary` in the :program:`mongo` shell:
46
49
47
50
.. code-block:: javascript
@@ -116,13 +119,13 @@ Convert a Secondary to an Arbiter Running on a New Port Number
116
119
117
120
mkdir /data/db-temp
118
121
119
- #. Start a new :program:`mongod` instance on a different port from the
120
- secondary, specifying the new data directory and the existing replica
122
+ #. Start a new :program:`mongod` instance on a different port,
123
+ specifying the new data directory and the existing replica
121
124
set. Issue a command similar to the following:
122
125
123
126
.. code-block:: sh
124
127
125
- mongod --port 27021 --dbpath /data/db --replSet rs
128
+ mongod --port 27021 --dbpath /data/db-temp --replSet rs
126
129
127
130
#. In the :program:`mongo` shell connected to the current primary,
128
131
convert the secondary to an arbiter using the :method:`rs.addArb()`
@@ -170,4 +173,4 @@ Convert a Secondary to an Arbiter Running on a New Port Number
170
173
171
174
mv /data/db /data/db-old
172
175
173
- .. optional:: You may remove the data instead.
176
+ .. optional:: You may remove the data instead.
0 commit comments