# Remaining shards after using allocation.exclude

**URL:** <https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349>\
**Category:** Elasticsearch\
**Created:** [February 16, 2022, 10:05am UTC](https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349 "2022-02-16T10:05:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [February 16, 2022, 10:05am UTC](https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349/1 "2022-02-16T10:05:34Z")

</div>

Hey!

I wanted to drain one out of the 9 nodes and I used allocation.exclude attribute:

```auto
PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.exclude._ip" : "1.2.3.4"
  }
}

```

The problem is that after a while it stopped moving the shards from 1 node to the other eight. There are 3 shards left in the node.

How can I spread them?

 ![2022-02-16_11-26](https://us1.discourse-cdn.com/elastic/original/3X/c/0/c0a4f616796bbddcee671004741bfbebbc97b355.png)

Is it safe to use "\_cluster/reroute move"?

/Angelos

---

<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:** [February 17, 2022, 1:20am UTC](https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349/2 "2022-02-17T01:20:46Z")

</div>

What's the output from `_cat/allocation?v`, it should show what's happening to those 3 shards.

---

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [February 17, 2022, 7:40am UTC](https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349/3 "2022-02-17T07:40:08Z")

</div>

Hey @warkolm,

The output is the above picture. I don't have unassigned shards but only 3 left from the node that was excluded.

/Angelos

---

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [February 17, 2022, 8:39am UTC](https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349/4 "2022-02-17T08:39:46Z")

</div>

I fixed it! The problem was That there filters that prevent reallocation from happening. I removed the filters and then I tried to move them manually and it worked flawlessly.

/Angelos

---

<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:** [March 17, 2022, 8:40am UTC](https://discuss.elastic.co/t/remaining-shards-after-using-allocation-exclude/297349/5 "2022-03-17T08:40:10Z")

</div>

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