Promote secondary to primary from secondary node

My test system (due to lack of resources) has a mongodb dual replicator. The arbiter does not exist.

During some system changes, one of the servers went down and won't come back. This server hosted the main mongo node. This left the only other element as secondary.

I know that I must have had at least three nodes for the cluster (our prod program).

Is there a way to make the main one, which is now disabled, to disconnect? I was unable to change any of the rs.conf () parameters because only the running node is secondary. start arbiter doesn't seem to work because I can't add it to replset as the primary file doesn't work.

Has anyone encountered this before and was able to solve it?

Repeat:

SERVER A (PRIMARY) - OFFLINE

SERVER B (SECONDARY) - ONLINE

A + B = REPLSET

Any help would be greatly appreciated.

+3


source to share


1 answer


The mongodb website has documentation on what to do (emergency only) when you need to reconfigure a replica set when members are omitted . This is similar to the situation you are in.



Basically, if you are using version> = 2.0 and it is an emergency, you can add force: true

replica set configuration to the command.

+10


source







All Articles