MongoDB Documentation, Release 3.0.4 Step 1: Stop a secondary. In the mongo shell, shut down the mongod instance: db.shutdownServer() Step 2: Restart the secondary as a standalone on a different port. At the operating system shell prompt, restart mongod as a standalone instance running on a different port and without the --replSet parameter: mongod --port 37017 --dbpath /srv/mongodb Always start mongod with the same user, even when restarting a replica set member as a standalone instance. Step 3: Perform maintenance operations on the secondary. While the member is a standalone, use the mongo shell to perform maintenance: mongo --port 37017 Step 4: Restart mongod as a member of the replica set. After performing all maintenance tasks, use the following procedure to restart the mongod as a member of the replica set on its usual port. From the mongo shell, shut down the standalone server after completing the maintenance: db.shutdownServer() Restart the mongod instance as a member of the replica set using its normal command-line arguments or configuration file. The secondary takes time to catch up to the primary (page 594). From the mongo shell, use the following command to verify that the member has caught up from the RECOVERING (page 656) state to the SECONDARY (page 655) state. rs.status() Step 5: Perform maintenance on the primary last. To perform maintenance on the primary after completing maintenance tasks on all secondaries, use rs.stepDown() in the mongo shell to step down the primary and allow one of the secondaries to be elected the new primary. Specify a 300 second waiting period to prevent the member from being elected primary again for five minutes: rs.stepDown(300) After the primary steps down, the replica set will elect a new primary. See Replica Set Elections (page 580) for more information about replica set elections. You can force a replica set member to become primary by giving it a higher priority value than any other member in the set. Optionally, you also can force a member never to become primary by setting its priority value to 0 , which means the member can never seek election (page 580) as primary. For more information, see Priority 0 Replica Set Members (page 567). For more information on priorities, see priority . 631 9.3. Replica Set Tutorials Force a Member to Become Primary Overview