Remove Inaccessible Mongolian Shard

I have a MongoDB setting with three shards: shard0000, shard0001 and shard0002. The machine that starts shard0002 is now turned off, which causes all my requests to fail. I would like to temporarily remove shard0002 from my setup and continue working with the first two shards. This should be doable, assuming I'm using invisible collections that are in the first two shards, right?

What I tried in the first place is: db.runCommand({removeshard: 'IP:PORT'}) , which obviously does not help, because it just puts the splinter in drain mode, which will never end (since he is omitted). Then I tried to connect to my configuration server and did db.shards.remove({_id: 'shard0002'}) in the configuration DB, and then restarted mongos to reload the configuration. Now, when I try to do something, I get "can not find the shard for: shard0002".

Is there any way for Mongo to know that I’m not interested in this shard right now, and then turn it on again when it becomes available.

+4
source share
2 answers

Manually change the shape record in config db, then removeshard

+4
source

I had another problem and I manually removed the shard with:

 use config db.shards.remove({"_id":"shard0002"}); 
+4
source

All Articles