@@ -25,7 +25,7 @@ following procedures.
25
25
26
26
2. Stop all processes in the cluster. Upgrade all processes to a
27
27
2.4-series release of MongoDB, and start all processes at the same
28
- 2. time.
28
+ time.
29
29
30
30
.. _upgrade-cluster-upgrade:
31
31
@@ -65,6 +65,11 @@ procedure.
65
65
1. Turn off the :ref:`balancer <sharding-balancing-internals>` in the
66
66
:term:`sharded cluster`, as described in
67
67
:ref:`sharding-balancing-disable-temporally`.
68
+
69
+ If you wish, *after* turning off the balancer you may make a backup
70
+ copy of the config database by using :program:`mongodump` or other
71
+ tools. The upgrade process also creates its own backup collections
72
+ which may be removed after the upgrade is verified complete.
68
73
69
74
#. Ensure there are no version 2.0 :program:`mongod` or
70
75
:program:`mongos` processes still active in the sharded
@@ -94,22 +99,52 @@ procedure.
94
99
95
100
The upgrade will prevent any chunk moves or splits from occurring
96
101
during the upgrade process. If there are very many sharded
97
- collections, acquiring the locks for all collections may take
102
+ collections or there are stale locks held by other failed processes,
103
+ acquiring the locks for all collections can take
98
104
seconds or minutes. See the log for progress updates.
99
105
100
106
#. When the :program:`mongos` process starts successfully, the upgrade is
101
107
complete. If the :program:`mongos` process fails to start, check the
102
108
log for more information.
103
109
104
- If a network interruption occurred and prevented changes, see
105
- :ref:`upgrade-cluster-resync`.
110
+ If a network problem occurred or the :program:`mongos` program is somehow
111
+ terminated during the upgrade, the upgrade process is generally retryable
112
+ if not in the short critical section.
113
+
114
+ If on retry the upgrade process waits on the upgrade lock, this means a
115
+ previous upgrade process may still be active or has ended abnormally. After
116
+ 15 minutes of no remote activity the upgrade lock will be forced, but if
117
+ you can verify the upgrade process is no longer active you may force this lock
118
+ manually:
119
+
120
+ .. code-block:: sh
121
+
122
+ mongo <2.2 mongos port>
123
+
124
+ .. code-block:: javascript
125
+
126
+ db.getMongo().getCollection("config.locks").findOne({ _id : "upgradeLock" })
127
+
128
+ If the host mentioned in the process field of this lock is known to be offline,
129
+ you may then run:
130
+
131
+ .. code-block:: javascript
132
+
133
+ db.getMongo().getCollection("config.locks").update({ _id : "upgradeLock" }, { $set : { state : 0 } })
134
+
135
+ It is safer to wait for the mongos to verify inactivity if you have any doubt
136
+ about whether another upgrade is occurring.
137
+
138
+ If a network interruption occurred and prevented changes during the critical
139
+ section, you will get a message on retry to follow the instructions
140
+ here :ref:`upgrade-cluster-resync`.
106
141
107
142
#. :ref:`Re-enable the balancer
108
143
<sharding-balancing-disable-temporally>`. You can now perform
109
144
operations that modify cluster metadata.
110
-
145
+
111
146
#. Upgrade and restart other :program:`mongos` processes in the
112
- sharded cluster, without the :option:`--upgrade <mongos --upgrade>`
147
+ sharded cluster, * without* the :option:`--upgrade <mongos --upgrade>`
113
148
option.
114
149
115
150
Once you have upgraded, *do not* introduce version 2.0 MongoDB
@@ -138,7 +173,7 @@ To resync the config servers:
138
173
1. Turn off the :ref:`balancer <sharding-balancing-internals>` in the
139
174
sharded cluster and stop all metadata operations. If you are in the
140
175
middle of an upgrade process (:ref:`upgrade-cluster-upgrade`), you
141
- have already disabled the balancer. .
176
+ have already disabled the balancer.
142
177
143
178
#. Shut down two of the three config servers, preferably the last two listed
144
179
in the :setting:`configdb` string. For example, if your :setting:`configdb`
0 commit comments