title: Why when I add new collections just one shard gets the data? - MongoDB
body: <p>I'm studying sharding with mongodb and I have the follow structure:</p>
  
  <ul>
  <li>1 Mongod to my ConfigServer with just 1 member in ReplicaSet</li>
  <li>2 Shards each with 2 members in ReplicaSet</li>
  <li>1 Mongos</li>
  </ul>
  
  <p>I have one database named erp and 3 collections, pessoas, produtos and contatos.</p>
  
  <p>So I have add my collections using:</p>
  
  <pre><code>sh.shardCollection("erp.&lt;collection&gt;", { id: 1 }, true)
  </code></pre>
  
  <p>I begin with collection pessoas, this collection have 2000 documents and are distributed this way:</p>
  
  <pre><code>mongos&gt; db.pessoas.getShardDistribution()
  
  Shard rs1 at rs1/desenv1:27019,desenv1:27020
  data : 57KiB docs : 1497 chunks : 36
  estimated data per chunk : 1KiB
  estimated docs per chunk : 41
  
  Shard rs3 at rs3/desenv1:27022,desenv1:27023
  data : 19KiB docs : 503 chunks : 36
  estimated data per chunk : 541B
  estimated docs per chunk : 13
  
  Totals
   data : 77KiB docs : 2000 chunks : 72
   Shard rs1 contains 75.27% data, 74.85% docs in cluster, avg obj size on        shard : 39B
   Shard rs3 contains 24.72% data, 25.15% docs in cluster, avg obj size on shard : 38B"
  </code></pre>
  
  <p>After this I have add the collection produtos, and I gave to her 1001 registers, so why this collection are distributed this way:</p>
  
  <pre><code>mongos&gt; db.produtos.getShardDistribution()
  
  Shard rs1 at rs1/desenv1:27019,desenv1:27020
   data : 67KiB docs : 1001 chunks : 1
   estimated data per chunk : 67KiB
   estimated docs per chunk : 1001
  
  Totals
   data : 67KiB docs : 1001 chunks : 1
   Shard rs1 contains 100% data, 100% docs in cluster, avg obj size on shard : 69B"
  </code></pre>
  
  <p><strong>Questions:</strong></p>
  
  <ul>
  <li><p>Why only replicaSet "rs1" are getting data? The same thing happen with the collection contatos, only replicaSet "rs1" gets the data and I can't distribute the data to the other shard.</p></li>
  <li><p>Why this happens and what I'm doing wrong?</p></li>
  <li><p>How do I distribute equally the data? For example with 2000 registers, 1000 registers in one shard and 1000 in the another shard.</p></li>
  </ul>
  
  <p>If you guys need more information just tell me.</p>
  
  <p>Thanks</p>