@@ -28,8 +28,8 @@ following procedures.
28
28
Upgrade a Sharded Cluster from MongoDB 2.2 to MongoDB 2.4
29
29
---------------------------------------------------------
30
30
31
- .. important:: Only upgrade sharded clusters to 2.4 if all members of
32
- the cluster are currently running instances of 2.2. The only
31
+ .. important:: Only upgrade sharded clusters to 2.4 if ** all** members
32
+ of the cluster are currently running instances of 2.2. The only
33
33
supported upgrade path for sharded clusters running 2.0 is via 2.2.
34
34
35
35
Upgrading a :term:`sharded cluster` from MongoDB version 2.2 to 2.4
@@ -44,17 +44,38 @@ are capable of handling epochs, even though 2.2 did not require them.
44
44
This procedure applies only to upgrades from version 2.2. Earlier
45
45
versions of MongoDB do not correctly handle epochs.
46
46
47
- While the upgrade is in progress, you cannot make changes to the
48
- collection metadata. For example, you cannot perform operations that
49
- add shards, drop databases, or drop collections, or modify the
50
- metadata in any other way.
51
-
52
47
.. warning::
53
48
54
- Once you upgrade to 2.4 and complete the upgrade procedure **do
55
- not** use 2.0 :program:`mongod` and :program:`mongos` processes in
56
- your cluster. 2.0 process may re-introduce old metadata formats
57
- into cluster metadata.
49
+ - .. include:: /includes/fact-upgrade-sharded-cluster-prereq.rst
50
+
51
+ - While the upgrade is in progress, you cannot make changes to the
52
+ collection metadata. For example, during the upgrade, do **not**
53
+ perform:
54
+
55
+ - :method:`sh.enableSharding()`,
56
+
57
+ - :method:`sh.shardCollection()`,
58
+
59
+ - :method:`sh.addShard()`,
60
+
61
+ - :method:`db.createCollection()`,
62
+
63
+ - :method:`db.collection.drop()`,
64
+
65
+ - :method:`db.dropDatabase()`,
66
+
67
+ - any operation that creates a database, or
68
+
69
+ - any other operation that modifies the cluster metadata in any
70
+ way. See :doc:`/reference/sharding-commands` for a complete list
71
+ of sharding commands. Note, however, that not all commands on
72
+ the :doc:`/reference/sharding-commands` page modifies the
73
+ cluster metadata.
74
+
75
+ - Once you upgrade to 2.4 and complete the upgrade procedure **do
76
+ not** use 2.0 :program:`mongod` and :program:`mongos` processes in
77
+ your cluster. 2.0 process may re-introduce old metadata formats
78
+ into cluster metadata.
58
79
59
80
.. note::
60
81
@@ -71,9 +92,12 @@ Sharded Cluster Upgrade Procedure
71
92
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72
93
73
94
Do not perform operations that modify metadata while performing this
74
- procedure.
95
+ procedure. See :ref:`2.4-upgrade-cluster` for examples of prohibited
96
+ operations.
75
97
76
- 1. Turn off the :ref:`balancer <sharding-balancing-internals>` in the
98
+ #. .. include:: /includes/fact-upgrade-sharded-cluster-prereq.rst
99
+
100
+ #. Turn off the :ref:`balancer <sharding-balancing-internals>` in the
77
101
:term:`sharded cluster`, as described in
78
102
:ref:`sharding-balancing-disable-temporally`.
79
103
@@ -305,7 +329,7 @@ these indexes. For example:
305
329
.. code-block:: javascript
306
330
307
331
db.records.dropIndex( { loc: "2dsphere" } )
308
- db.records.dropIndex( { records: "text " } )
332
+ db.records.dropIndex( { "records_text " } )
309
333
310
334
db.records.ensureIndex( { loc: "2dsphere" } )
311
335
db.records.ensureIndex( { records: "text" } )
@@ -315,19 +339,22 @@ these indexes. For example:
315
339
Downgrade MongoDB from 2.4 to Previous Versions
316
340
-----------------------------------------------
317
341
318
- For some cases the on-disk format of data files used by 2.4
319
- and 2.2 :program:`mongod` is compatible, and you can upgrade and
320
- downgrade if needed. However, several new features in 2.4 require
321
- additional attention. These features are :
342
+ For some cases the on-disk format of data files used by 2.4 and 2.2
343
+ :program:`mongod` is compatible, and you can upgrade and downgrade if
344
+ needed. However, several new features in 2.4 are incompatible with
345
+ previous versions :
322
346
323
- - ``2dsphere`` indexes on 2.2 and earlier :program:`mongod` instances.
347
+ - ``2dsphere`` indexes are incompatible with 2.2 and earlier
348
+ :program:`mongod` instances.
324
349
325
- - ``text`` indexes on 2.2 and earlier :program:`mongod` instances.
350
+ - ``text`` indexes are incompatible with 2.2 and earlier
351
+ :program:`mongod` instances.
326
352
327
- - using a ``hashed`` index as a shard key with 2.2 and earlier
328
- :program:`mongos` instances
353
+ - using a ``hashed`` index as a shard key are incompatible with 2.2 and
354
+ earlier :program:`mongos` instances
329
355
330
- - ``hashed`` indexes on 2.0 and earlier :program:`mongod` instances.
356
+ - ``hashed`` indexes are incompatible with 2.0 and earlier
357
+ :program:`mongod` instances.
331
358
332
359
.. note::
333
360
@@ -413,11 +440,11 @@ indexes using :method:`db.collection.dropIndex()`, for example:
413
440
.. code-block:: javascript
414
441
415
442
db.records.dropIndex( { loc: "2dsphere" } )
416
- db.records.dropIndex( { records: "text " } )
443
+ db.records.dropIndex( { "records_text " } )
417
444
418
445
.. warning::
419
446
420
- :option:`--upgrade <mongo --upgrade>` will run
447
+ :option:`--upgrade <mongod --upgrade>` will run
421
448
:dbcommand:`repairDatabase` on any database where you have created
422
449
a ``2dsphere`` or ``text`` index, which will rebuild *all*
423
450
indexes.
0 commit comments