Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3685

Primary shard of existing databases

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • v1.3.7
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      http://docs.mongodb.org/manual/core/sharded-cluster-shards/

      When you deploy a new sharded cluster, the “first” shard becomes the primary shard for all existing databases before enabling sharding. Databases created subsequently may reside on any shard in the cluster.

      Let's say you have a server A with database foo (and lots of data), and servers B and C which do not have the database foo. You then set up a sharded cluster and addShards in this order: B, C, A. Once you enable sharding for foo, the primary is server A, even though it's not the first shard.

      I tested this on 2.4.8, happy to do more testing if needed.

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            joanna.cheng@mongodb.com Joanna Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              9 years, 43 weeks, 3 days ago