MongoDB Documentation, Release 3.0.4 Use splitAt() to split a chunk in two, using the queried document as the lower bound in the new chunk: The following command splits the chunk that contains the value of 63109 for the zipcode field in the people collection of the records database. sh.splitAt( "records.people", { "zipcode": "63109" } ) Note: splitAt() does not necessarily split the chunk into two equally sized chunks. The split occurs at the location of the document matching the query, regardless of where that document is in the chunk. In most circumstances, you should let the automatic balancer migrate chunks between shards . However, you may want to migrate chunks manually in a few cases: To manually migrate chunks, use the moveChunk command. For more information on how the automatic balancer moves chunks between shards, see Cluster Balancer (page 684) and Chunk Migration (page 685). Migrate a single chunk The following example assumes that the field username is the shard key for a collection named users in the myapp database, and that the value smith exists within the chunk to migrate. Migrate the chunk using the following command in the mongo shell. This command moves the chunk that includes the shard key value “smith” to the shard named mongodb-shard3.example.net . The command will block until the migration is complete. To return a list of shards, use the listShards command. Evenly migrate chunks To evenly migrate chunks for the myapp.users collection, put each prefix chunk on the next shard from the other and run the following commands in the mongo shell: Chapter 10. Sharding 724 var shServer = [ "sh0.example.net", "sh1.example.net", "sh2.example.net", "sh3.example.net" for ( var x=97; x<97+26; x++ ){ for ( var y=97; y<97+26; y+=6 ) { db.adminCommand( { moveChunk : "myapp.users", find : {username : "smith"}, to : "mongodb-shard3.example.net" } ) • When pre-splitting an empty collection, migrate chunks manually to distribute them evenly across the shards. Use pre-splitting in limited situations to support bulk data ingestion. • If the balancer in an active cluster cannot distribute chunks within the balancing window (page 716), then you will have to migrate chunks manually. Migrate Chunks in a Sharded Cluster Example Example Tip Example