# Elastic shards and replica

**URL:** https://discuss.elastic.co/t/elastic-shards-and-replica/272552
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [May 10, 2021, 8:25am UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552 "2021-05-10T08:25:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![TheHunter1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thehunter1/32/80190_2.png) [@TheHunter1](https://discuss.elastic.co/u/TheHunter1)
#### Post date: [May 10, 2021, 8:25am UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/1 "2021-05-10T08:25:38Z")

</div>

Hello everyone,

I would like to understand something about shards and replica,  
I have a cluster of 3 DATA nodes (2 Hot and 1 Warm), I have configured ILM to have one shard and one replica in the HOT nodes, and then once it passed to the WARM node, I delete the replica and just save the shards in that node.

Today when I restarted one of my HOT nodes, the stat of some of shards in the `WARM` nodes became `YELLOW`

I would like to understand why these shards have been affected as they are in the WARM node and not in the Hot nodes ?

wehn I run `GET _cluster/allocation/explain?pretty` I get some output like these :

```auto
"allocate_explanation" : "cannot allocate because allocation is not permitted to any of the nodes",
 
"explanation" : "index has a preference for tiers [data_warm,data_hot] and node does not meet the required [data_warm] tier"
 
"explanation" : "index has a preference for tiers [data_warm,data_hot] and node does not meet the required [data_warm] tier"

"explanation" : "a copy of this shard is already allocated to this node [[metricbeat-7.10.1-2021.03.19-000003][0], node[nN9JxEJrTQ6wIBoQLHC-WA], [P], s[STARTED], a[id=MEt6XzEhS1G2WH6n-2-1jg]]"

```

Thanks for your help

---

<div class="post-metadata">

### Author: ![TheHunter1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thehunter1/32/80190_2.png) [@TheHunter1](https://discuss.elastic.co/u/TheHunter1)
#### Post date: [May 10, 2021, 9:36am UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/2 "2021-05-10T09:36:28Z")

</div>

UPDATE: I restarted all the nodes again, and now the cluster health is `GREEN`  
But It would be cool if someone can explain to me why the shards in the `WARM` node had been affected when I restarted the `HOT` node !

Thanks 🙂

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [May 10, 2021, 10:03am UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/3 "2021-05-10T10:03:02Z")

</div>

> [@TheHunter1](#):
>
> once it passed to the WARM node, I delete the replica

The allocation explain output indicates that you did not delete the replica on this index even though it was supposed to be in the warm phase.

---

<div class="post-metadata">

### Author: ![TheHunter1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thehunter1/32/80190_2.png) [@TheHunter1](https://discuss.elastic.co/u/TheHunter1)
#### Post date: [May 10, 2021, 11:16am UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/4 "2021-05-10T11:16:43Z")

</div>

Here is how I Configured ILM:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7d6bb34cce7aaecb910272a95e4b7996b5b6197d.png)

This should delete all the replicas in the Warm phase, isn't it ?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [May 10, 2021, 1:08pm UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/5 "2021-05-10T13:08:36Z")

</div>

> [@TheHunter1](#):
>
> This should delete all the replicas in the Warm phase, isn't it ?

Looks like it should, but apparently it didn't have that effect. Are you sure this policy applies to the index that caused you trouble?

---

<div class="post-metadata">

### Author: ![TheHunter1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thehunter1/32/80190_2.png) [@TheHunter1](https://discuss.elastic.co/u/TheHunter1)
#### Post date: [May 10, 2021, 1:21pm UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/6 "2021-05-10T13:21:43Z")

</div>

I have configured all my policies the same way.  
I will investigate more to find out if there is something wrong in the cluster, and then I will restartd one hot node, to see if I will get the same result as the first time

---

<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: [June 7, 2021, 1:21pm UTC](https://discuss.elastic.co/t/elastic-shards-and-replica/272552/7 "2021-06-07T13:21:58Z")

</div>

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