I have two standalone nodes, which have mongodb running on them. Both of them have a replica set configuration rs0 and start with rs.initiate(). But in some scenarios, I want them to run as individual nodes, but in some cases, I want one to become primary and one to become secondary. But since I have done rs.initiate() on both, I won't be able to add any node as secondary. So is there a way to undo the replica set configuration so that I can enable adding the secondary node.
↧