Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-387

FAQ entry for shard balancer prioritizing of chunk migrations and draining

      Scenario:

      A sharded system has uneven chunk distribution. The user removes a shard (setting it to drain) and adds new shards. The balancer prioritizes moving chunks to reach equilibrium before draining the removed shard. This priority is not configurable.

      Two alternative solutions:

      • Stop the balancer. Write a script to manually move chunks off of the draining shard (using the moveChunk command). Restart the balancer.
      • Set the maxSize on the new shards to some low value so they cannot accept more chunks, which should stop the balancing operation and allow draining to continue (with chunks likely moved to the full shards). Restore the original maxSize value afterwards. When changing maxSize in the config database, you probably need to run the flushRouterConfig command to refresh mongos. Versions of mongos prior to 2.0 won't support this, so you'd need to restart mongos.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 15 weeks, 3 days ago