MongoDB Documentation, Release 3.0.4 Disable the Balancer Disable the balancer to stop chunk migration (page 685) and do not perform any metadata write operations until the process finishes. If a migration is in progress, the balancer will complete the in-progress migration before stopping. To check the balancer state, issue the sh.getBalancerState() method. For more information, see Disable the Balancer (page 717). To disable the balancer, connect to one of the cluster’s mongos instances and issue the following method: sh.stopBalancer() Migrate Each Config Server Separately Migrate each config server (page 670) by starting with the last config server listed in the configDB string. Proceed in reverse order of the configDB string. Migrate and restart a config server before proceeding to the next. Do not rename a config server during this process. Note: If the name or address that a sharded cluster uses to connect to a config server changes, you must restart every mongod and mongos instance in the sharded cluster. Avoid downtime by using CNAMEs to identify config servers within the MongoDB deployment. See Migrate Config Servers with Different Hostnames (page 708) for more information. Important: Start with the last config server listed in configDB . 1. Shut down the config server. This renders all config data for the sharded cluster “read only.” 2. Change the DNS entry that points to the system that provided the old config server, so that the same hostname points to the new system. How you do this depends on how you organize your DNS and hostname resolution services. 3. Copy the contents of dbPath from the old config server to the new config server. For example, to copy the contents of dbPath to a machine named mongodb.config2.example.net , you might issue a command similar to the following: rsync -az /data/configdb/ mongodb.config2.example.net:/data/configdb mongod --configsvr 4. Start the config server instance on the new system. The default invocation is: Restart the mongos Instances If the configDB string will change as part of the migration, you must shut down all mongos instances before changing the configDB string. This avoids errors in the sharded cluster over configDB string conflicts. If the configDB string will remain the same, you can migrate the mongos instances sequentially or all at once. 1. Shut down the mongos instances using the shutdown command. If the configDB string is changing, shut down all mongos instances. 710 Chapter 10. Sharding