Mongodb – Create Replica Sets on an existing sharded MongoDB

mongodbreplicationsharding

How do I convert an existing mongodb instance that has sharding enabled for some of its collections to a replica set? I am able to do it the other way around, but I am not able to figure out how to add replication to existing sharded mongo instances.

Best Answer

You don't convert collections to a replica set. You convert (stand alone shard) node (where all databases and collections are) to the replica set.

Convert (stand alone) node to the replica set, follow these instructions.