# ILM Shrink - All primary on same node fails

**URL:** https://discuss.elastic.co/t/ilm-shrink-all-primary-on-same-node-fails/264309
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [February 15, 2021, 12:32pm UTC](https://discuss.elastic.co/t/ilm-shrink-all-primary-on-same-node-fails/264309 "2021-02-15T12:32:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cwiechmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cwiechmann/32/80908_2.png) [@cwiechmann](https://discuss.elastic.co/u/cwiechmann)
#### Post date: [February 15, 2021, 12:32pm UTC](https://discuss.elastic.co/t/ilm-shrink-all-primary-on-same-node-fails/264309/1 "2021-02-15T12:32:28Z")

</div>

Hi All,

I'm using ILM-Policies in order to automate the Index-Lifecycle. As part of the Warm-Phase indices should be shrinked.  
I'm currently running into the following problem reported by: `GET /_cluster/allocation/explain`:

```json
{
  "decider" : "same_shard",
  "decision" : "NO",
  "explanation" : "a copy of this shard is already allocated to this node [[my-index-name-000002][4], node[1vFhysSMQEack-XZvmKkRg], [P], s[STARTED], a[id=1tF5F8jtTx-YNvcRYGSFOg]]"
}

```

The shrink action requires that all primary shards are assigned to the same node, but the same\_node decider prevents that all primary shards are assigned to this node, as one of the replicas is already running on this node.

This finally stops the automated ILM / Shrink process. Any idea how to improve that? The ultimate goal is to avoid manual intervention into that process.

Thanks!  
Chris

---

<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, 2021, 12:38am UTC](https://discuss.elastic.co/t/ilm-shrink-all-primary-on-same-node-fails/264309/2 "2021-02-17T00:38:17Z")

</div>

What's the output of `_cat/allocation/my-index-name-000002?v`?

---

<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, 2021, 12:39am UTC](https://discuss.elastic.co/t/ilm-shrink-all-primary-on-same-node-fails/264309/3 "2021-03-17T00:39:00Z")

</div>

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