diff --git a/source/tutorial/remove-replica-set-member.txt b/source/tutorial/remove-replica-set-member.txt index d6aab0bce51..015ee7117f3 100644 --- a/source/tutorial/remove-replica-set-member.txt +++ b/source/tutorial/remove-replica-set-member.txt @@ -4,35 +4,32 @@ Remove Members from Replica Set .. default-domain:: mongodb -You may remove a member of a replica set at any time; *however*, for best +For best results always *shut down* the :program:`mongod` instance before -removing it from a replica set. +removing it from a :term:`replica set`. .. versionchanged:: 2.2 - Before 2.2, you *had* to shut down the :program:`mongod` instance - before removing it. While 2.2 removes this requirement, it remains - good practice. - -To remove a member, use the -:method:`rs.remove()` method in the :program:`mongo` shell while -connected to the current :term:`primary`. Issue the -:method:`db.isMaster()` command when connected to *any* member of the -set to determine the current primary. Use a command in either -of the following forms to remove the member: - -.. code-block:: javascript - - rs.remove("mongo2.example.net:27017") - rs.remove("mongo3.example.net") - -This operation disconnects the shell briefly and forces a -re-connection as the :term:`replica set` renegotiates which member -will be primary. The shell displays an error even if this -command succeeds. - -You can re-add a removed member to a replica set at any time using the -:doc:`procedure for adding replica set members `. -Additionally, consider using the :ref:`replica set reconfiguration procedure -` to change the -:data:`~local.system.replset.members[n].host` value to rename a member in a replica set -directly. + In versions prior to 2.2, you *must* to shut down the :program:`mongod` instance + before removing it. + +To remove a member: + +1. Connect to the :term:`primary`. + + If you do not know which member is the primary, connect to any member + and issue the :method:`db.isMaster()` command. + +#. Use :method:`rs.remove()` in either of the following forms to remove + the member: + + .. code-block:: javascript + + rs.remove("mongo2.example.net:27017") + rs.remove("mongo3.example.net") + + MongoDB disconnects the shell briefly and forces a re-connection as + the replica set runs a new election for primary. The shell displays + an error even if this command succeeds. + +To add a member back to a replica set, see the :doc:`procedure for +adding replica set members `.