# Primary shards not balanced across nodes for elasticsearch 5.2

**URL:** <https://discuss.elastic.co/t/primary-shards-not-balanced-across-nodes-for-elasticsearch-5-2/141746>\
**Category:** Elasticsearch\
**Created:** [July 26, 2018, 11:04am UTC](https://discuss.elastic.co/t/primary-shards-not-balanced-across-nodes-for-elasticsearch-5-2/141746 "2018-07-26T11:04:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayakrishnan\_Nair](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayakrishnan\_Nair](https://discuss.elastic.co/u/Jayakrishnan_Nair)\
**Post date:** [July 26, 2018, 11:04am UTC](https://discuss.elastic.co/t/primary-shards-not-balanced-across-nodes-for-elasticsearch-5-2/141746/1 "2018-07-26T11:04:18Z")

</div>

Hi,  
I am using elasticsearch version 5.2, we have setup 4 data nodes and 3 masters cluster. In our cluster we have 20 indexes with 5 primary and 1 replica. We have seen 2 data node on same physical server has 89 primary shards while other 2 data nodes on the other node has 19 primary shards. I want to balance the number of shards on both nodes. Node on which there are 89 primary shard is causing huge disk utilization and CPU compared to other node.  
Can you please provide a way to balance the cluster at the start of index generation.

---

<div class="post-metadata">

**Author:** ![Jayakrishnan\_Nair](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayakrishnan\_Nair](https://discuss.elastic.co/u/Jayakrishnan_Nair)\
**Post date:** [July 26, 2018, 1:18pm UTC](https://discuss.elastic.co/t/primary-shards-not-balanced-across-nodes-for-elasticsearch-5-2/141746/2 "2018-07-26T13:18:14Z")

</div>

Got the issue. It was space issue on another node causing the elasticsearch to re-balance the cluster.

---

<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:** [August 23, 2018, 1:18pm UTC](https://discuss.elastic.co/t/primary-shards-not-balanced-across-nodes-for-elasticsearch-5-2/141746/3 "2018-08-23T13:18:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
