Docs Menu
Docs Home
/
MongoDB Cloud Manager
/

Edit a Replica Set

On this page

  • Overview
  • Procedures
  • Add a Replica Set Member
  • Edit a Replica Set Member
  • Replace a Member with an Arbiter
  • Remove a Replica Set Member
  • Edit a Cluster Configuration
  • Edit Replication Settings
  • Additional Information

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

Note

Cloud 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:

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.

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
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Deployment page is not already displayed, click Deployment in the sidebar.

    The Deployment page displays.

2

Click the Processes tab for your deployment.

The Processes page displays.

3
4
5
6

Use the following procedure to add the host if it doesn't appear in the Hostname list:

  1. In Hostname, select New Server.

    If no hosts have yet been added to the project, the Hostname list does not appear. Click Install Agent instead.

  2. In the Add New Server dialog, select your operating system and click Next.

  3. Follow the instructions to install a MongoDB Agent on the new host.

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 adds the new member to the replica set. To learn more, see members[n].buildIndexes.

Warning

If your replica set uses TLS, you must create and install the necessary TLS certificates on the new replica set member host first. Then, set the TLS 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 TLS on the new member, you cannot add it to the existing TLS-enabled replica set. To learn how to enable TLS on the new replica set member, see Enable TLS for a Deployment.

  1. In the Replica Set Configuration section, complete the following fields for the new member:

    Auth Schema Version
    Select the schema for storing the user data for your deployment. See Upgrade to SCRAM for more information.
    Feature Compatibility (Optional)
    Version
    Select the MongoDB version for your replica set.
    Data Directory
    Specify the full path of the directory where the mongod process will store data files.
    Log File
    Specify the location and name of the log file for the mongod process on the new host.
7
8
9

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 Cloud Manager automatically updates the configuration to match the priority and votes value specified in the deployment.

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

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Deployment page is not already displayed, click Deployment in the sidebar.

    The Deployment page displays.

2

Click the Processes tab for your deployment.

The Processes page displays.

3
4
5

You can modify the following settings:

Votes
Specify whether the replica set member votes in elections. A value of 1 indicates the member votes, while a value of 0 indicates that the member does not vote.
Priority
Specify the priority of the replica set member during elections. Non-voting members must have a priority of 0.
Delay
Specify whether the member is a delayed replica set member.
Build Indexes
Specify whether the replica set member builds indexes.
Tags
Enter JSON that defines the tag set that you want to add to the replica set member.

Note

After deploying the replica set, you can't modify a replica set member's hostname or port.

6
7
8

Otherwise, click Cancel and you can make additional changes.

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
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Deployment page is not already displayed, click Deployment in the sidebar.

    The Deployment page displays.

2

Click the Processes tab for your deployment.

The Processes page displays.

3
4
5

Select Arbiter from the Member list when you Add a Replica Set Member.

6
7
8

Otherwise, click Cancel and you can make additional changes.

9

Note

To determine which processes are secondaries, click the Metrics tab and select secondaries in Toggle Members.

  1. Click Modify next to the replica set.

  2. Select Remove from Replica Set.

  3. Click Save.

10
11

When you remove a member from a replica set, Cloud Manager converts the member's mongod to a standalone process and shuts it down.

When removing members, you must keep a majority of voting members active with respect to the original number of voting members. Without a majority, the primary replica set member steps down and the replica set becomes read-only. 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
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Deployment page is not already displayed, click Deployment in the sidebar.

    The Deployment page displays.

2

Click the Processes tab for your deployment.

The Processes page displays.

3
4
5
6
7
8
9

To edit a cluster configuration:

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Deployment page is not already displayed, click Deployment in the sidebar.

    The Deployment page displays.

2

Click the Processes tab for your deployment.

The Processes page displays.

3
4
5

In the Replica Set Configuration section, complete the following fields.

Auth Schema Version
Select the schema for storing the user data for your deployment.
Feature Compatibility (Optional)
Version
Select the MongoDB version for your replica set.
Log File
Specify the location and name of the log file for the mongod process. The location must exist on the host.
6
7
8

Otherwise, click Cancel and you can make additional changes.

To edit replication settings:

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Deployment page is not already displayed, click Deployment in the sidebar.

    The Deployment page displays.

2

Click the Processes tab for your deployment.

The Processes page displays.

3
4

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

5

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

6
7
8

Otherwise, click Cancel and you can make additional changes.

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

Back

Calculate Suggested Indexes