Docs Home → MongoDB Ops Manager
Edit a Replica Set
On this page
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 fromkeyfile
tosendKeyFile
triggers a restart. All other changes to this option do not.net.tls.mode
: Changing the value fromdisabled
toallowTLS
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:
Navigate to the Clusters view for your deployment.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
If it is not already displayed, click Deployment in the sidebar.
Click the Clusters view.
In Hostname, select the host that you want to add as a new member of the replica set.
Use the following procedure to add the host if it doesn't appear in the Hostname list:
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.
In the Add New Server dialog, select your operating system and click Next.
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.
In the Replica Set Configuration section, complete the following fields for the new member:
Auth Schema VersionSelect the schema for storing the user data for your deployment. See Upgrade to SCRAM for more information.Feature Compatibility (Optional)Select the feature compatibility set. This field appears if your deployment MongoDB version is3.4
or later.VersionSelect the MongoDB version for your replica set.
Note
Available Versions
Ops Manager lists only the MongoDB versions that are available for your deployment.
To disable this filtering, see
automation.versions.download.baseUrl.allowOnlyAvailableBuilds
.Data DirectorySpecify the full path of the directory where themongod
process will store data files.Log FileSpecify the location and name of the log file for themongod
process on the new host.
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
To reconfigure a member as an arbiter, see Replace a Member with an Arbiter
Navigate to the Clusters view for your deployment.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
If it is not already displayed, click Deployment in the sidebar.
Click the Clusters view.
In Member Configuration, modify the settings for the replica set member that you want to edit.
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
.
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.
Navigate to the Clusters view for your deployment.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
If it is not already displayed, click Deployment in the sidebar.
Click the Clusters view.
Add a new member to the replica set.
Select Arbiter from the Member list when you Add a Replica Set Member.
Click Confirm & Deploy.
Upon completion, Ops Manager removes the member from the replica set. Ops Manager converts the member's mongod to a standalone process and shuts it down.
Remove a Replica Set Member
When you remove a member from a replica set, Ops 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:
Navigate to the Clusters view for your deployment.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
If it is not already displayed, click Deployment in the sidebar.
Click the Clusters view.
Click Confirm & Deploy.
Upon completion, Ops Manager removes the member from the replica set. Ops Manager converts the member's mongod to a standalone process and shuts it down.
Edit a Cluster Configuration
To edit a cluster configuration:
Navigate to the Clusters view for your deployment.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
If it is not already displayed, click Deployment in the sidebar.
Click the Clusters view.
Configure the replica set.
In the Replica Set Configuration section, complete the following fields.
Auth Schema Version | Select the schema for storing the user data for your
deployment. If you are upgrading from a MongoDB version older
than 3.0, MongoDB 3.0 uses a different schema for user data
than previous versions. |
Feature Compatibility (Optional) | Select the feature compatibility set. This
field appears if your deployment MongoDB version is
3.4 or later. |
Version | Select the MongoDB version for your replica set. NoteAvailable VersionsOps Manager lists only the MongoDB versions that are available for your deployment. To disable this filtering, see
|
Log File | Specify the location and name of the log file for the
mongod process. The location must exist on the host. |
Edit Replication Settings
To edit replication settings:
Navigate to the Clusters view for your deployment.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
If it is not already displayed, click Deployment in the sidebar.
Click the Clusters view.
In Replication Settings, modify the desired replication setting.
See Replica Set Configuration Fields for descriptions of all fields and which versions of MongoDB support each field.
Additional Information
For more information on replica set configuration options, see, Replica Set Configuration in the MongoDB manual.