Sharded Cluster, procedure to turn off some shard

Hi,

I am looking for a procedure to turn off some shards from a Sharded Cluster.
I have done some research but as far as I can tell there is no clear procedure.
I understand that I can run removeShard, but if something fails or gets deleted it could be an issue.
I prefer first to set the primary to a specific server and then start removing shards.
Is there a procedure for that ?

Thanks

Welcome @Daniel_Benedykt

Its a pretty well defined procedure:
https://docs.mongodb.com/manual/tutorial/remove-shards-from-cluster/#remove-shards-from-an-existing-sharded-cluster

It covers moving the sharded collections, jumbo chunks and what to do if the shard is a primary shard.
It has clear warnings where you should take care.

Can you expand on this.

The procedure specifies the moving of primary shard for unsharded collections to occur after the sharded collections have been drained.

Thanks for pointing me to the procedure. I couldn’t find it.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.