In this blog post, we will discuss how to deal
with jumbo chunks in MongoDB.
You are a MongoDB DBA, and your first task of the day is to
remove a shard from your cluster. It sounds scary at first, but
you know it is pretty easy. You can do it with a simple command:
db.runCommand( { removeShard: "server1_set6" } )
MongoDB then does its magic. It finds the chunks and databases
and balances them across all other servers. You can go to sleep
without any worry.
The next morning when you wake up, you check the status of that
particular shard and you find the process is stuck:
"msg" : "draining ongoing",
"state" : "ongoing",
"remaining" : {
"chunks" : NumberLong(3),
"dbs" : NumberLong(0)
There are three chunks that for some reason haven’t been
migrated, so the
removeShard
…
[Read more]