Skip to content

Commit c90f1cb

Browse files
author
Bob Grabar
committed
DOCS-408 entered review edits to arbiter doc
1 parent 27efeae commit c90f1cb

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

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

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Procedures
4343
Convert a Secondary to an Arbiter and Reuse the Port Number
4444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4545

46+
#. If your application is connecting directly to the secondary,
47+
modify the application so that MongoDB queries don't reach
48+
the secondary.
49+
50+
#. Shut down the secondary.
51+
4652
#. Remove the :term:`secondary` from the :term:`replica set` by calling
4753
the :method:`rs.remove()` method. Perform this operation while connected to the current
4854
:term:`primary` in the :program:`mongo` shell:
@@ -58,8 +64,6 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
5864

5965
rs.config()
6066

61-
#. Shut down the secondary.
62-
6367
#. Move the secondary's data directory to an archive folder. For example:
6468

6569
.. code-block:: sh
@@ -68,9 +72,6 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
6872

6973
.. optional:: You may remove the data instead.
7074

71-
#. Modify your application so that MongoDB queries don't reach
72-
the secondary.
73-
7475
#. Create a new, empty data directory to point to when restarting the
7576
:program:`mongod` instance. You can reuse the previous name. For
7677
example:
@@ -113,13 +114,19 @@ Convert a Secondary to an Arbiter and Reuse the Port Number
113114
Convert a Secondary to an Arbiter Running on a New Port Number
114115
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115116

116-
#. Create a new, empty data directory. For example:
117+
#. If your application is connecting directly to the secondary
118+
or has a connection string referencing the secondary,
119+
modify the application so that MongoDB queries don't reach
120+
the secondary.
121+
122+
#. Create a new, empty data directory to be used with the new port
123+
number. For example:
117124

118125
.. code-block:: sh
119126

120127
mkdir /data/db-temp
121128

122-
#. Start a new :program:`mongod` instance on a different port,
129+
#. Start a new :program:`mongod` instance on the new port number,
123130
specifying the new data directory and the existing replica
124131
set. Issue a command similar to the following:
125132

@@ -128,14 +135,14 @@ Convert a Secondary to an Arbiter Running on a New Port Number
128135
mongod --port 27021 --dbpath /data/db-temp --replSet rs
129136

130137
#. In the :program:`mongo` shell connected to the current primary,
131-
convert the secondary to an arbiter using the :method:`rs.addArb()`
138+
convert the new :program:`mongod` instance to an arbiter using the :method:`rs.addArb()`
132139
method:
133140

134141
.. code-block:: javascript
135142

136143
rs.addArb("<hostname>:<port>")
137144

138-
#. Verify the arbiter belongs to the replica set by calling the
145+
#. Verify the arbiter has been added to the replica set by calling the
139146
:method:`rs.config()` method in the :program:`mongo` shell.
140147

141148
.. code-block:: javascript
@@ -150,17 +157,14 @@ Convert a Secondary to an Arbiter Running on a New Port Number
150157

151158
#. Shut down the secondary.
152159

153-
#. If you have an application connection string referencing the old
154-
secondary, remove the reference.
155-
156160
#. Remove the :term:`secondary` from the :term:`replica set` by calling
157161
the :method:`rs.remove()` method in the :program:`mongo` shell:
158162

159163
.. code-block:: javascript
160164

161165
rs.remove("<hostname>:<port>")
162166

163-
#. Verify that the replica set no longer includes the secondary by
167+
#. Verify that the replica set no longer includes the old secondary by
164168
calling the :method:`rs.config()` method in the :program:`mongo` shell:
165169

166170
.. code-block:: javascript

0 commit comments

Comments
 (0)