Moving a replica set between a sharded and non sharded


As part of the labs, we take our old replica set and change it to work in a sharded environment.

If we start up the replica set with an non sharded config, does it still work.

I suppose the question is, once sharded can a replica set go back to being standalone?

Yes you can. Follow the steps here:


Good to see, that it just requires the removal of that setting in the conf, if it is only a singular shard.

A small note, a couple of the commands to connect to mongos server were missing from the lecture notes.

Definitely could do with a little note on shutting down all the servers in a clean manner. As part of the lecture notes.

Yes, that would be a great idea. I will make sure this point soon gets updated.