Skip to content

Commit 6d7008b

Browse files
author
Sam Kleinman
committed
DOCS-631: correting sh.addShard() syntax and use
1 parent a1f78f3 commit 6d7008b

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

source/administration/sharding.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,16 @@ use the following procedure as a quick starting point:
8888
sh.addShard( "mongodb0.example.net:27027" )
8989

9090
If ``mongodb0.example.net:27027`` is a member of a replica
91-
set, MongoDB will discover all other members of the replica set.
91+
set, call the :method:`sh.addShard()` method with an argument that
92+
resembles the following:
9293

93-
Repeat this step for each new shard in your cluster.
94+
.. code-block:: javascript
95+
96+
sh.addShard( "<setName>/mongodb0.example.net:27027" )
97+
98+
Replace, ``<setName>`` with the name of the replica set, and
99+
MongoDB will discover all other members of the replica set. Repeat
100+
this step for each new shard in your cluster.
94101

95102
.. optional::
96103

source/tutorial/add-shards-to-shard-cluster.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,16 @@ For example:
5454

5555
sh.addShard( "mongodb0.example.net:27027" )
5656

57-
MongoDB will discover all other members of the replica set, if
58-
``mongodb0.example.net:27027`` is a member of a replica set.
57+
If ``mongodb0.example.net:27027`` is a member of a replica
58+
set, call the :method:`sh.addShard()` method with an argument that
59+
resembles the following:
60+
61+
.. code-block:: javascript
62+
63+
sh.addShard( "<setName>/mongodb0.example.net:27027" )
64+
65+
Replace, ``<setName>`` with the name of the replica set, and
66+
MongoDB will discover all other members of the replica set.
5967

6068
.. note:: In production deployments, all shards should be replica sets.
6169

0 commit comments

Comments
 (0)