I have setup mongodb sharded cluster with following topology

  • 3x3 shards (each have 2 replica sets)
  • 1x3 config server replica cluster
  • 2 mongos routers

I want to shutdown whole cluster temporary keeping data integrity intact. I may use this setup later so I do not want to scrap whole setup.

Any suggestions would be appreciated.

  1. stop balancing - run sh.stopBalancer() from mongos

  2. shutdown mongos services - run db.shutdownServer() from mongos

  3. shutdown config mongod services - run db.shutdownServer() from config server mongod

  4. shutdown shards mongod services - run db.shutdownServer() from replica set mongod

  • Thanks for the update. On next cluster start the order would be like start shards mondo servers --> start config mongod servers --> start mongos router. Am i getting this right ? – Ramraj Patel Jun 10 at 6:17
  • The starting order is : Config servers, Shards and then Mongos. – Mani Jun 10 at 16:48
  • thanks Mani.... – Ramraj Patel Jun 11 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.