NoamiA
NoamiA

Reputation: 567

MONGO election primary

I had a replica set with 5 mongo nodes I shut 3 nodes for DR testing and add a new node to replica. however, even though one node has higher priority I still have 3 secondaries nodes and no primary. do you know why, what should be done how can I fix it

Upvotes: 0

Views: 403

Answers (1)

D. SM
D. SM

Reputation: 14490

When you shut down 3 out of 5 nodes, you lost the ability to have a primary since a majority of nodes must vote for the primary.

When you added a new node, the new node had to sync data from the primary before it could become a new primary. Since there was no primary this sync couldn't have happened.

Your DR plans need to ensure there is always a majority of nodes operational.

Upvotes: 2

Related Questions