In this recipe, we will be looking at how to remove a member from a replica set. If you have done the previous two recipes in this chapter, this should be a breeze.
Removing a node from the replica set
Getting ready
For this recipe, we will need a three node replica set. If you don’t have one ready, I suggest referring to the first two recipes of this chapter.
How to do it...
- Open the mongo shell and log in to one of the nodes. Run rs.status() to find the primary node:
rs.status()['members']
[
{
"_id" : 0,
"name" : "...