@@ -399,3 +399,45 @@ chunk migration failure independently.
399399If you encounter this issue, contact the `MongoDB User Group
400400<http://groups.google.com/group/mongodb-user>`_ or 10gen support to
401401address this issue.
402+
403+ How does draining a shard affect the balancing of uneven chunk distribution?
404+ ----------------------------------------------------------------------------
405+
406+ Consider the scenario where you have a sharded cluster with an uneven
407+ chunk distribution and you remove a shard as well as add new shards.
408+
409+ With version 2.2, the balancer first removes the chunks from the
410+ draining shard and then balances the uneven chunk distribution.
411+
412+ Before version 2.2, the balancer first handles the uneven chunk
413+ distribution and then removes the chunks from the draining shard.
414+ Although this balancer prioritization is **not** configurable, you can,
415+ however, achieve the desired behavior with one of the following manual
416+ solutions:
417+
418+ - Option 1
419+
420+ #. Stop the balancer.
421+
422+ #. Use the :dbcommand:`moveChunk` command to move chunks off of the
423+ draining shard.
424+
425+ #. Restart the balancer.
426+
427+ - Option 2
428+
429+ #. Set the ``maxSize`` on the new shards to some low value so that they
430+ cannot accept more chunks. This should stop the balancing
431+ operation and allow the draining to continue with chunks
432+ moved to the full shards.
433+
434+ #. Restore the original ``maxSize`` on the new shards.
435+
436+ .. note::
437+
438+ When changing the ``maxSize`` in the :term:`config database`:
439+
440+ - in versions 2.0+, run the :dbcommand:`flushRouterConfig` command
441+ to refresh the :program:`mongos`.
442+
443+ - in versions pre-2.0, you need to restart :program:`mongos`.
0 commit comments