Hi all,
I tried to remove a shard from exsiting cluster, following the steps listed here:
But, after running the "removeshard" command, the status is always "draining".
mongos> db.printShardingStatus()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
{ "_id" : "r1", "host" : "r1/host1,host2" }
{ "_id" : "r2", "draining" : true, "host" : "r2/host3,host4" }
{ "_id" : "r3", "host" : "r3/host5,host6" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "test", "partitioned" : false, "primary" : "r1" }
{ "_id" : "foo", "partitioned" : true, "primary" : "r1" }
foo.t1 chunks:
r3 12
r1 12
too many chunks to print, use verbose if you want to force print
foo.t2 chunks:
r1 22
r3 21
too many chunks to print, use verbose if you want to force print
{ "_id" : "bar", "partitioned" : false, "primary" : "r2" }
mongos> db.runCommand({removeshard: "r2"})
{
"msg" : "draining ongoing",
"state" : "ongoing",
"remaining" : {
"chunks" : NumberLong(0),
"dbs" : NumberLong(1)
},
"ok" : 1
}
You can see that all the chunks had been moved to r1 and r3, but the state of removing sharding stayed as "ongoing" for more than 2 hours, what should I do?
Why there are remaining "dbs" in the output of "db.runCommand({removeshard: "r2"})"? The remaining db is "bar" listed in "db.printShardingStatus()"?
Thanks in advance.