# All primary shards are added to only one node

**URL:** <https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260>\
**Category:** Elasticsearch\
**Created:** [December 15, 2015, 4:34pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260 "2015-12-15T16:34:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)\
**Post date:** [December 15, 2015, 4:34pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260/1 "2015-12-15T16:34:11Z")

</div>

Hi,

I see a behavior in elasticsearch that all the primary shards (we have 5 shards per index) added to only one of the three nodes in cluster all the time. Why is this happening?

Currently we have replicas disabled. When we add replica to that index, then the replicas are distributed among other two nodes.

Thanks.

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [December 15, 2015, 8:03pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260/2 "2015-12-15T20:03:25Z")

</div>

Does your elasticsearch config contain any settings that start with `cluster.routing.`?

---

<div class="post-metadata">

**Author:** ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)\
**Post date:** [December 15, 2015, 8:06pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260/3 "2015-12-15T20:06:11Z")

</div>

Even before the cluster.routing was there this issue raised.  
But I added that setting for rolling restarting of nodes yesterday.  
But this issue of all primary shards into one node is happening for last one week.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 16, 2015, 12:56am UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260/4 "2015-12-16T00:56:43Z")

</div>

What version?

---

<div class="post-metadata">

**Author:** ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)\
**Post date:** [December 16, 2015, 2:52am UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260/5 "2015-12-16T02:52:38Z")

</div>

1.5.2

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:30pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-added-to-only-one-node/37260/6 "2017-07-05T23:30:45Z")

</div>


