@@ -7,9 +7,7 @@ Shard Cluster Administration
7
7
8
8
.. default-domain:: mongodb
9
9
10
- This document provides a collection of basic operations and procedures
11
- for administering :term:`shard clusters <shard cluster>`.
12
-
10
+ This document describes common administrative tasks.
13
11
For a full introduction to sharding in MongoDB see
14
12
":doc:`/core/sharding`," and for a complete overview of all sharding
15
13
documentation in the MongoDB Manual, see ":doc:`/sharding`." The
@@ -19,35 +17,40 @@ cluster. Finally, the ":doc:`/core/sharding-internals`" document
19
17
provides a more detailed introduction to sharding when troubleshooting
20
18
issues or understanding your cluster's behavior.
21
19
20
+
22
21
.. contents:: Sharding Procedures:
23
22
:backlinks: none
24
23
:local:
25
24
26
25
.. _sharding-procedure-setup:
27
26
28
- Setup
29
- -----
27
+ Set up a Shard Cluster
28
+ ----------------------
29
+
30
+ Before deploying a shard cluster, see the requirements listed in
31
+ :ref:`Requirements for Shard Clusters <sharding-requirements>`.
32
+
33
+ For testing purposes, you can run all the required shard processes on a
34
+ single server. For production, use the configurations described in
35
+ :doc:`/administration/replication-architectures`.
30
36
31
- If you have an existing replica set, you can use the
32
- ":doc:`/tutorial/convert-replica-set-to-replicated-shard-cluster`"
33
- tutorial as a guide. If you're deploying a :term:`shard cluster` from
34
- scratch, see the ":doc:`/tutorial/deploy-shard-cluster`" tutorial for
35
- more detail or use the following procedure as a quick starting point:
37
+ .. include:: /includes/warning-sharding-hostnames.rst
36
38
37
- #. Provision the required hardware.
39
+ .. TODO Keep this or delete it:
40
+ If you have an existing replica set, you can use the
41
+ :doc:`/tutorial/convert-replica-set-to-replicated-shard-cluster`
42
+ tutorial as a guide. If you're deploying a :term:`shard cluster` from
43
+ scratch, see the :doc:`/tutorial/deploy-shard-cluster` tutorial for
44
+ more detail or use the following procedure as a quick starting point:
38
45
39
- The ":ref:`sharding-requirements`" section describes what you'll
40
- need to get started.
46
+ 1. Set up the required config servers, shards, and :program:`mongos`
47
+ instances described in :ref:`Sharding Infrastructure
48
+ <sharding-requirements-infrastructure>`.
41
49
42
- .. warning:: Sharding and "localhost" Addresses
43
50
44
- If you use either "localhost" or "``127.0.0.1``" as the host
45
- identifier, then you must use "localhost" or "``127.0.0.1``" for
46
- *all* host settings for any MongoDB instances in the cluster. If
47
- you mix localhost addresses with remote host address, MongoDB will
48
- produce errors.
51
+ #. Start the three (3) config servers.
49
52
50
- #. On all three (3) config server instances, issue the following
53
+ #. On all three config server instances, issue the following
51
54
command to start the :program:`mongod` process:
52
55
53
56
.. code-block:: sh
@@ -129,8 +132,8 @@ more detail or use the following procedure as a quick starting point:
129
132
130
133
replicaSetName/<seed1>,<seed2>,<seed3>
131
134
132
- For example, if the name of the replica set is " ``repl0``" , then
133
- your :method:`sh.addShard` command would be:
135
+ For example, if the name of the replica set is ``repl0``, then
136
+ your :method:`sh.addShard() ` command would be:
134
137
135
138
.. code-block:: javascript
136
139
@@ -199,9 +202,9 @@ more detail or use the following procedure as a quick starting point:
199
202
the distribution of data. Furthermore, you cannot change a
200
203
collection's shard key once it has been set.
201
204
202
- See the " :ref:`Shard Key Overview <sharding-shard-key>`" and the
203
- more in depth documentation of " :ref:`Shard Key Qualities
204
- <sharding-internals-shard-keys>`" to help you select better shard
205
+ See the :ref:`Shard Key Overview <sharding-shard-key>` and the
206
+ more in depth documentation of :ref:`Shard Key Qualities
207
+ <sharding-internals-shard-keys>` to help you select better shard
205
208
keys.
206
209
207
210
If you do not specify a shard key, MongoDB will shard the
@@ -271,7 +274,7 @@ procedure:
271
274
following form: the replica set name, followed by a forward
272
275
slash, followed by a comma-separated list of seeds for the
273
276
replica set. For example, if the name of the replica set is
274
- "myapp1", then your :method:`sh.addShard` command might resemble:
277
+ "myapp1", then your :method:`sh.addShard() ` command might resemble:
275
278
276
279
.. code-block:: javascript
277
280
@@ -282,9 +285,9 @@ procedure:
282
285
It may take some time for :term:`chunks <chunk>` to migrate to the
283
286
new shard.
284
287
285
- See the " :ref:`Balancing and Distribution <sharding-balancing>`"
286
- section for an overview of the balancing operation and the " :ref:`Balancing Internals
287
- <sharding-balancing-internals>`" section for additional information.
288
+ See the :ref:`Balancing and Distribution <sharding-balancing>`
289
+ section for an overview of the balancing operation and the :ref:`Balancing Internals
290
+ <sharding-balancing-internals>` section for additional information.
288
291
289
292
.. _sharding-procedure-remove-shard:
290
293
@@ -695,7 +698,7 @@ Balancer Operations
695
698
This section provides an overview of common administrative procedures
696
699
related to balancing and the balancing process.
697
700
698
- .. seealso:: " :ref:`sharding-balancing`" and the
701
+ .. seealso:: :ref:`sharding-balancing` and the
699
702
:dbcommand:`moveChunk` that provides manual :term:`chunk`
700
703
migrations.
701
704
@@ -947,7 +950,7 @@ name.
947
950
#. Shut down the config server that you're moving.
948
951
949
952
This will render all config data for your cluster :ref:`read only
950
- <sharding-config-server>`."
953
+ <sharding-config-server>`.
951
954
952
955
#. Change the DNS entry that points to the system that provided the old
953
956
config server, so that the *same* hostname points to the new
@@ -1072,7 +1075,7 @@ of the cluster metadata from the config database is straight forward:
1072
1075
.. [#read-only] While one of the three config servers unavailable, no
1073
1076
the cluster cannot split any chunks nor can it migrate chunks
1074
1077
between shards. Your application will be able to write data to the
1075
- cluster. The " :ref:`sharding-config-server`" section of the
1078
+ cluster. The :ref:`sharding-config-server` section of the
1076
1079
documentation provides more information on this topic.
1077
1080
1078
1081
.. index:: troubleshooting; sharding
0 commit comments