Skip to content

Commit 0985c96

Browse files
author
Bob Grabar
committed
DOCS-408 proc to convert secondary to arbiter
1 parent 5051169 commit 0985c96

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

draft/tutorial/convert-secondary-into-arbiter.txt

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Convert a Secondary to an Arbiter
44

55
.. default-domain:: mongodb
66

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.
11+
712
Synopsis
813
--------
914

@@ -41,11 +46,10 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
4146

4247
.. code-block:: javascript
4348

44-
rs.remove("*hostname:port number*")
49+
rs.remove("<hostname>:<port>")
4550

46-
#. Ensure that the secondary has been removed from the replica set by
47-
calling the :method:`rs.config()` method while connected to the current
48-
primary in the :program:`mongo` shell:
51+
#. Verify that the replica set no longer includes the secondary by
52+
calling the :method:`rs.config()` method in the :program:`mongo` shell:
4953

5054
.. code-block:: javascript
5155

@@ -59,7 +63,7 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
5963

6064
mv /data/db /data/db-old
6165

62-
Optionally, you can remove the data entirely.
66+
.. optional:: You may remove the data instead.
6367

6468
#. Modify your application so that MongoDB queries don't reach
6569
the secondary.
@@ -81,23 +85,21 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
8185

8286
mongod --port 27021 --dbpath /data/db --replSet rs
8387

84-
#. In the :program:`mongo` shell connected to the current primary,
85-
convert the secondary to an arbiter using the :method:`rs.addArb()`
86-
method:
88+
#. In the :program:`mongo` shell convert the secondary to an arbiter
89+
using the :method:`rs.addArb()` method:
8790

8891
.. code-block:: javascript
8992

90-
rs.addArb("*hostname:port number*")
93+
rs.addArb("<hostname>:<port>")
9194

92-
#. Verify the arbiter is added to the replica set by calling the
93-
:method:`rs.config()` method in the :program:`mongo` shell (connected
94-
to the current primary).
95+
#. Verify the arbiter belongs to the replica set by calling the
96+
:method:`rs.config()` method in the :program:`mongo` shell.
9597

9698
.. code-block:: javascript
9799

98100
rs.config()
99101

100-
The arbiter member should include the following field and value:
102+
The arbiter member should include the following:
101103

102104
.. code-block:: javascript
103105

@@ -128,17 +130,16 @@ Convert a Secondary to an Arbiter Running on a New Port Number
128130

129131
.. code-block:: javascript
130132

131-
rs.addArb("*hostname:port number*")
133+
rs.addArb("<hostname>:<port>")
132134

133-
#. Verify the arbiter is added to the replica set by calling the
134-
:method:`rs.config()` method in the :program:`mongo` shell (connected
135-
to the current primary).
135+
#. Verify the arbiter belongs to the replica set by calling the
136+
:method:`rs.config()` method in the :program:`mongo` shell.
136137

137138
.. code-block:: javascript
138139

139140
rs.config()
140141

141-
The arbiter member should include the following field and value:
142+
The arbiter member should include the following:
142143

143144
.. code-block:: javascript
144145

@@ -150,16 +151,14 @@ Convert a Secondary to an Arbiter Running on a New Port Number
150151
secondary, remove the reference.
151152

152153
#. Remove the :term:`secondary` from the :term:`replica set` by calling
153-
the :method:`rs.remove()` method while connected to the current
154-
:term:`primary` in the :program:`mongo` shell:
154+
the :method:`rs.remove()` method in the :program:`mongo` shell:
155155

156156
.. code-block:: javascript
157157

158-
rs.remove("*hostname:port number*")
158+
rs.remove("<hostname>:<port>")
159159

160-
#. Ensure that the secondary has been removed from the replica set by
161-
calling the :method:`rs.config()` method while connected to the current
162-
primary in the :program:`mongo` shell:
160+
#. Verify that the replica set no longer includes the secondary by
161+
calling the :method:`rs.config()` method in the :program:`mongo` shell:
163162

164163
.. code-block:: javascript
165164

@@ -171,4 +170,4 @@ Convert a Secondary to an Arbiter Running on a New Port Number
171170

172171
mv /data/db /data/db-old
173172

174-
Optionally, you can remove the data entirely.
173+
.. optional:: You may remove the data instead.

0 commit comments

Comments
 (0)