Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Edit a Replica Set

Overview

You can add, remove, and reconfigure members in a replica set directly in the Ops Manager console.

Note

Ops Manager restarts a node in a replica set or sharded cluster when you change configuraton file options for the MongoDB process running on the node. The following options trigger a restart only for the specified changes:

  • security.clusterAuthMode: Changing the value from keyfile to sendKeyFile triggers a restart. All other changes to this option do not.
  • net.ssl.mode: Changing the value from disabled to allowSSL triggers a restart. All other changes to this option do not.

A restarted node triggers an election if the node was the primary. In addition, modifying the member settings of the current primary may trigger an election.

Procedures

Add a Replica Set Member

You must have an existing server to which to deploy the new replica set member. To add a member to an existing replica set, increasing the size of the set:

1

Click Deployment, then the Processes tab, then the Topology view.

2

On the line listing the replica set, click Modify.

3

Add and configure the new member.

To add a member, use the plus sign (+) icon to increase the number of members in the MongoDs Per Replica Set field.

You can configure the member as a normal replica set member, as a hidden, delayed, or priority-0 secondary, or as an arbiter.

Note

When adding a new member to a replica set, set Build Indexes to True if you want the member’s mongod to build indexes. You cannot change this value after the Automation Agent adds the new member to the replica set. See members[n].buildIndexes for more information.

Warning

If your replica set uses SSL (or TLS), you must create and install the necessary SSL certificates on the new replica set member host then set the SSL settings for the mongod or mongos process for the new replica set member on that host. Automation does not create and install the certificates and configure these settings automatically. If you do not configure SSL on the new member, you cannot add it to the existing SSL-enabled replica set. To learn how to enable SSL on the new replica set member, see Enable SSL for a Deployment.

4

Click Apply.

5

Move the new member to any available host. (Optional)

Ops Manager adds the new replica set member to the host with the fewest replica set members. If you want Ops Manager to serve the new member from a specific host, you can move the member to any host that belongs to the deployment.

  1. Click on the Servers tab.

  2. Find the new member. It has three dots along the left side of its name instead of a lock icon.

  3. Click and drag this member to any host that shows Drag processes between servers in the server tile status box.

    • If the host can accept the new member, Drag processes between servers changes to Drop process here. You can drop the member on that host.

    • If the host is using the same port the new member is using, Drag processes between servers changes to a caution notice that says Port Change Required. You can drop the member on that host. Ops Manager automatically changes the port number to an open port.

    • If the host cannot accept the new member because the host is unmanaged, Drag processes between servers changes to a warning notice that says Server Not Managed. You cannot drop the member on that host until you manage that host.

      To learn how to manage a host, see Add Existing MongoDB Processes to Ops Manager.

6

Click Review & Deploy to review your changes.

7

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.

Important

To avoid disrupting majority writes, new members are now added to replica sets as priority=0, votes=0 until they reach secondary state, after which Ops Manager automatically updates the configuration to match the priority and votes value specified in the deployment.

Edit a Replica Set Member

Use this procedure to:

To reconfigure a member as an arbiter, see Replace a Member with an Arbiter

1

Click Deployment, then the Processes tab, then the Topology view.

2

On the line listing the replica set, click Modify.

If you do not see the replica set, click the Processes tab, then the Topology view.

3

In the Member Options box in Replication Configuration, configure each member.

See Replica Set Configuration Fields for descriptions of all fields and which versions of MongoDB support each field.

4

Click Apply.

5

Click Review & Deploy to review your changes.

6

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.

Replace a Member with an Arbiter

You cannot directly reconfigure a member as an arbiter. Instead, you must must add a new member to the replica set as an arbiter. Then you must shut down an existing secondary.

1

Click Deployment, then the Processes tab, then the Topology view.

2

Click the replica set’s Modify button.

3

Add an arbiter.

In the MongoDs Per Replica Set field, increase the number of members by 1.

In the Member Options box, click the member’s drop-down arrow and select Arbiter.

Click Apply.

4

Click Review & Deploy to review your changes.

5

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.
6

Remove the secondary.

When the deployment completes, click the ellipsis icon for secondary to be removed, and then select Remove from Replica Set.

7

Click Review Changes.

8

Click Confirm & Deploy.

9

Remove the standalone instance. (Optional)

Upon completion, Ops Manager removes the member from the replica set. The instance continues to run as a standalone. To shut down the standalone, see Shut Down a MongoDB Process.

Remove a Replica Set Member

Removing a member from a replica set does not shut down the member or remove it from Ops Manager. Ops Manager still monitors the mongod as as standalone instance.

When removing members, you must keep a majority of voting members active with respect to the original number of voting members. Otherwise your primary will step down and your replica set become read-only. You can remove multiple members at once only if doing so leaves a majority. For more information on voting, see Replica Set Elections and Replica Set High Availability in the MongoDB Manual.

Removing members might affect the ability of the replica set to acknowledge writes, depending on the level of write concern you use. For more information, see Write Concern in the MongoDB manual.

To remove a member:

1

Click Deployment, then the Processes tab, then the Topology view.

2

Click the ellipsis icon for the member to be removed and select Remove from Replica Set.

3

Click Remove to confirm.

4

Click Review & Deploy to review your changes.

5

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.
6

Remove the standalone instance. (Optional)

Upon completion, Ops Manager removes the member from the replica set. The instance continues to run as a standalone. To shut down the standalone, see Shut Down a MongoDB Process.

Edit Replication Settings

Use this procedure to:

1

Click Deployment, then the Processes tab, then the Topology view.

2

On the line listing the replica set, click Modify.

If you do not see the replica set, click the Processes tab, then the Topology view.

3

In Replication Configuration, click show replication settings.

4

Modify the desired replication settings.

See Replica Set Configuration Fields for descriptions of all fields and which versions of MongoDB support each field.

5

Click Apply.

6

Click Review & Deploy to review your changes.

7

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.

Additional Information

For more information on replica set configuration options, see, Replica Set Configuration in the MongoDB manual.