@@ -38,38 +38,38 @@ title: "Upgrade the config servers."
38
38
level : 4
39
39
ref : 3.6-upgrade-config-servers
40
40
content : |-
41
- If the config servers are replica sets:
42
-
43
41
1. Upgrade the :ref:`secondary <replica-set-secondary-members>`
44
42
members of the replica set one at a time:
45
43
46
44
a. Shut down the secondary :binary:`~bin.mongod` instance and replace
47
45
the |oldversion| binary with the |newversion| binary.
48
46
49
- #. Start the |newversion| binary with both the ``--configsvr``,
50
- ``--port`` options,
51
-
52
- If the sharded cluster members are run on different hosts or
53
- if you wish remote clients to connect to the sharded cluster,
54
- you must also specify ``--bind_ip`` (or the
55
- :setting:`net.bindIp` setting). For more information, see
56
- :ref:`3.6-bind_ip-compatibility`.
47
+ #. Start the |newversion| binary with the :option:`--configsvr <mongod --configsvr>`,
48
+ :option:`--replSet <mongod --replSet>`, :option:`--port <mongod --port>`, and :option:`--bind_ip <mongod --bind_ip>`
49
+ options. Include any optional command line options used by the
50
+ previous deployment:
57
51
52
+ .. cssclass:: copyable-code
58
53
.. code-block:: sh
59
54
60
- mongod --configsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
55
+ mongod --configsvr --replSet <replSetName> --port <port> --dbpath <path> --bind_ip localhost,<ip address>
56
+
57
+ .. include:: /includes/fact-bind-ip-sharded-clusters.rst
61
58
62
59
If using a :doc:`configuration file
63
60
</reference/configuration-options>`, update the file to
64
61
specify :setting:`sharding.clusterRole: configsvr
65
- <sharding.clusterRole>` and :setting:`net.port` (and
66
- :setting:`net.bindIp` setting if needed) and start the
67
- |newversion| binary:
62
+ <sharding.clusterRole>`, :setting:`replication.replSetName`,
63
+ :setting:`net.port`, and :setting:`net.bindIp`,
64
+ then start the |newversion| binary:
68
65
66
+ .. cssclass:: copyable-code
69
67
.. code-block:: yaml
70
68
71
69
sharding:
72
70
clusterRole: configsvr
71
+ replication:
72
+ replSetName: <string>
73
73
net:
74
74
port: <port>
75
75
bindIp: localhost,<ip address>
@@ -90,6 +90,7 @@ content: |-
90
90
:method:`rs.stepDown()` to step down the primary and force an
91
91
election of a new primary:
92
92
93
+ .. cssclass:: copyable-code
93
94
.. code-block:: javascript
94
95
95
96
rs.stepDown()
@@ -99,31 +100,32 @@ content: |-
99
100
the stepped-down primary and replace the :binary:`~bin.mongod` binary
100
101
with the |newversion| binary.
101
102
102
- #. Start the |newversion| binary with both the ``--configsvr`` and
103
- ``--port`` options:
104
-
105
- If the sharded cluster members are run on different hosts or
106
- if you wish remote clients to connect to the sharded cluster,
107
- you must also specify ``--bind_ip`` (or the
108
- :setting:`net.bindIp` setting). For more information, see
109
- :ref:`3.6-bind_ip-compatibility`.
103
+ #. Start the |newversion| binary with the :option:`--configsvr <mongod --configsvr>`,
104
+ :option:`--replSet <mongod --replSet>`, :option:`--port <mongod --port>`, and :option:`--bind_ip <mongod --bind_ip>`
105
+ options. Include any optional command line options used by the
106
+ previous deployment:
110
107
108
+ .. cssclass:: copyable-code
111
109
.. code-block:: sh
112
110
113
- mongod --configsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
111
+ mongod --configsvr --replSet <replSetName> -- port <port> --dbpath <path> --bind_ip localhost,<ip address>
114
112
113
+ .. include:: /includes/fact-bind-ip-sharded-clusters.rst
115
114
116
115
If using a :doc:`configuration file
117
116
</reference/configuration-options>`, update the file to
118
117
specify :setting:`sharding.clusterRole: configsvr
119
- <sharding.clusterRole>` and :setting:`net.port` (and
120
- :setting:`net.bindIp` setting if needed) , and start the
121
- |newversion| binary:
118
+ <sharding.clusterRole>`, :setting:`replication.replSetName`,
119
+ :setting:`net.port` , and :setting:`net.bindIp`,
120
+ then start the |newversion| binary:
122
121
122
+ .. cssclass:: copyable-code
123
123
.. code-block:: yaml
124
124
125
125
sharding:
126
126
clusterRole: configsvr
127
+ replication:
128
+ replSetName: <string>
127
129
net:
128
130
port: <port>
129
131
bindIp: localhost,<ip address>
@@ -136,37 +138,43 @@ title: Upgrade the shards.
136
138
level : 4
137
139
ref : 3.6-upgrade-shards
138
140
content : |-
139
- Upgrade the shards one at a time. If the shards are replica sets, for each shard:
141
+ Upgrade the shards one at a time. If you are running standalone
142
+ shards, first convert them to a
143
+ :doc:`replica set</tutorial/convert-standalone-to-replica-set>`.
144
+
145
+ For each shard:
140
146
141
147
1. Upgrade the :ref:`secondary <replica-set-secondary-members>`
142
148
members of the replica set one at a time:
143
149
144
150
a. Shut down the :binary:`~bin.mongod` instance and replace the |oldversion|
145
151
binary with the |newversion| binary.
146
152
147
- #. Start the |newversion| binary with the ``--shardsvr`` and
148
- ``--port`` command line options.
149
-
150
- If the sharded cluster members are run on different hosts or
151
- if you wish remote clients to connect to the sharded cluster,
152
- you must also specify ``--bind_ip`` (or the
153
- :setting:`net.bindIp` setting). For more information, see
154
- :ref:`3.6-bind_ip-compatibility`.
153
+ #. Start the |newversion| binary with the :option:`--shardsvr <mongod --shardsvr>`,
154
+ :option:`--replSet <mongod --replSet>`, :option:`--port <mongod --port>`, and :option:`--bind_ip <mongod --bind_ip>`
155
+ options. Include any optional command line options used by the
156
+ previous deployment:
155
157
158
+ .. cssclass:: copyable-code
156
159
.. code-block:: sh
157
160
158
- mongod --shardsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
161
+ mongod --shardsvr --replSet <replSetName> --port <port> --dbpath <path> --bind_ip localhost,<ip address>
162
+
163
+ .. include:: /includes/fact-bind-ip-sharded-clusters.rst
159
164
160
- Of if using a :doc:`configuration file
165
+ If using a :doc:`configuration file
161
166
</reference/configuration-options>`, update the file to
162
- include :setting:`sharding.clusterRole: shardsvr
163
- <sharding.clusterRole>` and :setting:`net.port` ( and
164
- :setting:`net.bindIp` setting if needed) and start :
167
+ include :setting:`sharding.clusterRole: shardsvr <sharding.clusterRole>`,
168
+ :setting:`replication.replSetName`, :setting:`net.port`, and
169
+ :setting:`net.bindIp`, then start the |newversion| binary :
165
170
171
+ .. cssclass:: copyable-code
166
172
.. code-block:: yaml
167
173
168
174
sharding:
169
175
clusterRole: shardsvr
176
+ replication:
177
+ replSetName: <string>
170
178
net:
171
179
port: <port>
172
180
bindIp: localhost,<ip address>
@@ -188,6 +196,7 @@ content: |-
188
196
:method:`rs.stepDown()` to step down the primary and force an
189
197
election of a new primary:
190
198
199
+ .. cssclass:: copyable-code
191
200
.. code-block:: javascript
192
201
193
202
rs.stepDown()
@@ -199,30 +208,32 @@ content: |-
199
208
1. Shut down the stepped-down primary and replace the
200
209
:binary:`~bin.mongod` binary with the |newversion| binary.
201
210
202
- #. Start the |newversion| binary with the ``--shardsvr`` and
203
- ``--port`` command line options.
204
-
205
- If the sharded cluster members are run on different hosts or
206
- if you wish remote clients to connect to the sharded cluster,
207
- you must also specify ``--bind_ip`` (or the
208
- :setting:`net.bindIp` setting). For more information, see
209
- :ref:`3.6-bind_ip-compatibility`.
211
+ #. Start the |newversion| binary with the :option:`--shardsvr <mongod --shardsvr>`,
212
+ :option:`--replSet <mongod --replSet>`, :option:`--port <mongod --port>`, and :option:`--bind_ip <mongod --bind_ip>`
213
+ options. Include any optional command line options used by the
214
+ previous deployment:
210
215
216
+ .. cssclass:: copyable-code
211
217
.. code-block:: sh
212
218
213
- mongod --shardsvr --port <port> --dbpath <path> --bind_ip localhost,<ip address>
219
+ mongod --shardsvr --replSet <replSetName> -- port <port> --dbpath <path> --bind_ip localhost,<ip address>
214
220
215
- Of if using a :doc:`configuration file
221
+ .. include:: /includes/fact-bind-ip-sharded-clusters.rst
222
+
223
+ If using a :doc:`configuration file
216
224
</reference/configuration-options>`, update the file to
217
225
specify :setting:`sharding.clusterRole: shardsvr
218
- <sharding.clusterRole>` and :setting:`net.port` (and
219
- :setting:`net.bindIp` setting if needed) and start the
226
+ <sharding.clusterRole>`, :setting:`replication.replSetName`,
227
+ :setting:`net.port`, and : setting:`net.bindIp`, then start the
220
228
|newversion| binary:
221
229
230
+ .. cssclass:: copyable-code
222
231
.. code-block:: yaml
223
232
224
233
sharding:
225
234
clusterRole: shardsvr
235
+ replication:
236
+ replSetName: <string>
226
237
net:
227
238
port: <port>
228
239
bindIp: localhost,<ip address>
@@ -245,6 +256,7 @@ content: |-
245
256
:setting:`net.bindIp` setting). For more information, see
246
257
:ref:`3.6-bind_ip-compatibility`.
247
258
259
+ .. cssclass:: copyable-code
248
260
.. code-block:: sh
249
261
250
262
mongos --configdb csReplSet/<rsconfigsver1:port1>,<rsconfigsver2:port2>,<rsconfigsver3:port3> --bind_ip localhost,<ip address>
@@ -259,7 +271,6 @@ content: |-
259
271
:method:`sh.setBalancerState()` to re-enable the balancer:
260
272
261
273
.. cssclass:: copyable-code
262
-
263
274
.. code-block:: javascript
264
275
265
276
sh.setBalancerState(true)
@@ -286,9 +297,11 @@ action:
286
297
On a :binary:`~bin.mongos` instance, run the
287
298
:dbcommand:`setFeatureCompatibilityVersion` command in the ``admin``
288
299
database:
300
+ copyable : true
289
301
language : javascript
290
302
code : |
291
303
db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
304
+
292
305
post : |
293
306
This command must perform writes to an internal system
294
307
collection. If for any reason the command does not complete
0 commit comments