MongoDB Documentation, Release 3.0.4 mv /data/db /data/db-old You may remove the data instead. Optional 9.3.3 Replica Set Maintenance Tutorials Change the Size of the Oplog Overview Chapter 9. Replication 628 Important: Always start rolling replica set maintenance with the secondaries, and finish with the maintenance on primary member. To change the size of the oplog, you must perform maintenance on each member of the replica set in turn. The procedure requires: stopping the mongod instance and starting as a standalone instance, modifying the oplog size, and restarting the member. This tutorial describes how to resize the oplog. For a detailed explanation of oplog sizing, see Oplog Size (page 593). For details how oplog size affects delayed members and affects replication lag , see Delayed Replica Set Members (page 570). The oplog exists internally as a capped collection , so you cannot modify its size in the course of normal operations. In most cases the default oplog size (page 593) is an acceptable size; however, in some situations you may need a larger or smaller oplog. For example, you might need to change the oplog size if your applications perform large numbers of multi-updates or deletes in short periods of time. The following tutorials provide information in maintaining existing replica sets. Change the Size of the Oplog (page 628) Increase the size of the oplog which logs operations. In most cases, the default oplog size is sufficient. Perform Maintenance on Replica Set Members (page 630) Perform maintenance on a member of a replica set while minimizing downtime. Force a Member to Become Primary (page 631) Force a replica set member to become primary. Resync a Member of a Replica Set (page 633) Sync the data on a member. Either perform initial sync on a new member or resync the data on an existing member that has fallen too far behind to catch up by way of normal replication. Configure Replica Set Tag Sets (page 635) Assign tags to replica set members for use in targeting read and write operations to specific members. Reconfigure a Replica Set with Unavailable Members (page 638) Reconfigure a replica set when a majority of replica set members are down or unreachable. Manage Chained Replication (page 641) Disable or enable chained replication. Chained replication occurs when a secondary replicates from another secondary instead of the primary. Change Hostnames in a Replica Set (page 642) Update the replica set configuration to reflect changes in members’ hostnames. Configure a Secondary’s Sync Target (page 645) Specify the member that a secondary member synchronizes from.