[mongodb-user] Re: balancing databases within a cluster
Re: balancing databases within a cluster
William Byrne III <
Mon, 25 Apr 2016 16:50:30 -0700 (PDT)
When you create a database (by creating the first collection in it) in a sharded
> will set
a primary shard
for the database. This is where all un-sharded collections for that
database will be stored. As you don’t plan to shard any of your
collections, all collections for each database will be stored on its
You can see databases and their primary shards in the output of sh.status()
>, or by
displaying the contents of the config.databases collection:
Primary shards are chosen for new databases on the basis of which shard has
the most free space at the time the database is created. You can change the
primary chunk of a database with the movePrimary
Tag aware sharding
> can only be used
to control the location of ranges of documents within sharded collections,
so using tags to migrate databases will not be an option until you fully
You received this message because you are subscribed to the Google Groups "mongodb-user"
For other MongoDB technical support options, see:
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at
To view this discussion on the web visit
For more options, visit
for more updates.