@@ -200,11 +200,44 @@ Cluster Management
200200
201201Once you have a running sharded cluster, you will need to maintain it.
202202This section describes common maintenance procedure, including: how to
203- add and remove nodes , how to manually split chunks, and how to disable
203+ add and remove shards , how to manually split chunks, and how to disable
204204the balancer for backups.
205205
206- List all Shards
207- ~~~~~~~~~~~~~~~
206+ List Databases with Sharding Enabled
207+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208+
209+ To list the databases for which sharding is enabled, query the
210+ ``databases`` collection in the :ref:`config database
211+ <config-database>`. The databases with the ``partitioned`` field set to
212+ ``true`` have sharding enabled.
213+
214+ .. example:: Run this sequence of commands to open the :ref:`config
215+ database <config-database>` and query the ``databases`` collection.
216+
217+ .. code-block:: javascript
218+
219+ use config
220+
221+ db.databases.find()
222+
223+ Given the following example output:
224+
225+ .. code-block:: javascript
226+
227+ { "_id" : "admin", "partitioned" : false, "primary" : "config" }
228+
229+ { "_id" : "foo", "partitioned" : true, "primary" : "example1.com:30001" }
230+
231+ { "_id" : "baz", "partitioned" : false, "primary" : "example2.com:27017" }
232+
233+ Only the database `foo` has sharding enabled because only `foo` has
234+ the ``partitioned`` field set to ``true``.
235+
236+ .. note:: If a database in a sharded environment does not have sharding
237+ enabled, all its data is on the first shard of the cluster.
238+
239+ List Shards
240+ ~~~~~~~~~~~
208241
209242To list the current set of configured shards and verify that all shards
210243have been committed to the system, run the :dbcommand:`listShards`
@@ -216,6 +249,32 @@ command:
216249
217250.. _sharding-procedure-add-shard:
218251
252+
253+
254+
255+
256+
257+
258+
259+
260+
261+
262+
263+
264+
265+
266+
267+
268+
269+
270+
271+
272+
273+
274+
275+
276+
277+
219278Add a Shard to a Cluster
220279~~~~~~~~~~~~~~~~~~~~~~~~
221280
0 commit comments