# Shards allocation unbalanced on nodes

**URL:** <https://discuss.elastic.co/t/shards-allocation-unbalanced-on-nodes/135713>\
**Category:** Elasticsearch\
**Created:** [June 13, 2018, 12:15pm UTC](https://discuss.elastic.co/t/shards-allocation-unbalanced-on-nodes/135713 "2018-06-13T12:15:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fei\_Yao](https://avatars.discourse-cdn.com/v4/letter/f/85e7bf/32.png) [@Fei\_Yao](https://discuss.elastic.co/u/Fei_Yao)\
**Post date:** [June 13, 2018, 12:15pm UTC](https://discuss.elastic.co/t/shards-allocation-unbalanced-on-nodes/135713/1 "2018-06-13T12:15:43Z")

</div>

I'm using ES v5.6.3, with 3 data nodes. All indices have default 5:1 (primary:replica) setting. After it runs for awhile (from logstash to ES) I noticed one data node has 50% disk.used\_percent where all other 2 nodes have only 28%. I'm curious about it, and would assume ES will evenly distribute primary and replica shards across data nodes.

Node1: p2, p4, r0, r1, r3  
Node2: p0, r4, r2  
Node3: p1, p3.

Is there any way we can rebalance the shards "evenly" across nodes?

```
GET _cluster/settings
{
  "persistent": {},
  "transient": {
    "cluster": {
      "routing": {
        "rebalance": {
          "enable": "all"
         },
        "allocation": {
          "allow_rebalance": "always",
          "enable": "all"
        }
      }
    }
  }
}

```

I also have the allocation awareness setting as well  
`cluster.routing.allocation.awareness.attributes`

Thanks

---

<div class="post-metadata">

**Author:** ![Fei\_Yao](https://avatars.discourse-cdn.com/v4/letter/f/85e7bf/32.png) [@Fei\_Yao](https://discuss.elastic.co/u/Fei_Yao)\
**Post date:** [June 13, 2018, 12:20pm UTC](https://discuss.elastic.co/t/shards-allocation-unbalanced-on-nodes/135713/2 "2018-06-13T12:20:31Z")

</div>

It looks like you can manually do it [https://www.elastic.co/guide/en/elasticsearch/reference/5.6/cluster-reroute.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/cluster-reroute.html)

But, I'm hoping ES can self balance somehow.  
Please advise.

Thanks

---

<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 11, 2018, 12:20pm UTC](https://discuss.elastic.co/t/shards-allocation-unbalanced-on-nodes/135713/3 "2018-07-11T12:20:42Z")

</div>

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