In general and when possible, all members should have only 1 vote. This prevents intermittent ties, deadlocks, or the wrong members from becoming primary. Use priority to control which members are more likely to become primary. 

## Related Documents 

• votes 

• Replica Set Reconfiguration 

• Replica Set Elections (page 580) 

## Convert a Secondary to an Arbiter 

If you have a secondary in a replica set that no longer needs to hold data but that needs to remain in the set to ensure that the set can elect a primary (page 580), you may convert the secondary to an arbiter (page ?? ) using either procedure in this tutorial. Both procedures are operationally equivalent: 

• You may operate the arbiter on the same port as the former secondary. In this procedure, you must shut down the secondary and remove its data before restarting and reconfiguring it as an arbiter. 

For this procedure, see Convert Secondary to Arbiter and Reuse the Port Number (page 626). 

• Run the arbiter on a new port. In this procedure, you can reconfigure the server as an arbiter before shutting down the instance running as a secondary. 

For this procedure, see Convert Secondary to Arbiter Running on a New Port Number (page 627). 

## Convert Secondary to Arbiter and Reuse the Port Number 

1. If your application is connecting directly to the secondary, modify the application so that MongoDB queries don’t reach the secondary. 

2. Shut down the secondary. 

3. Remove the secondary from the replica set by calling the rs.remove() method. Perform this operation while connected to the current primary in the mongo shell: 

rs.remove("<hostname><:port>") 

4. Verify that the replica set no longer includes the secondary by calling the rs.conf() method in the mongo shell: 

rs.conf() 

5. Move the secondary’s data directory to an archive folder. For example: 

mv /data/db /data/db-old 

## Optional 

You may remove the data instead. 

6. Create a new, empty data directory to point to when restarting the mongod instance. You can reuse the previous name. For example: 

