# ILM: keep all indices on hot node

**URL:** <https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [February 1, 2021, 4:13pm UTC](https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861 "2021-02-01T16:13:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matejzero](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@matejzero](https://discuss.elastic.co/u/matejzero)\
**Post date:** [February 1, 2021, 4:13pm UTC](https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861/1 "2021-02-01T16:13:41Z")

</div>

Hello,

I'm transitioning to ILM and at the moment, I have hot and warm nodes. Warm nodes don't have any data as I have `cluster.routing.allocation.exclude._ip` set on the warm nodes.

I want to create an ILM policy that will keep all indices on the hot nodes if I remove cluster routing allocation settings. I will than later set different ILM policies to migrate indices to warm nodes.

At the moment, this is my policy:

```json
{ - 
  "hot-node-forever": { - 
    "version": 5,
    "modified_date": "2021-02-01T15:19:08.580Z",
    "policy": { - 
      "phases": { - 
        "hot": { - 
          "min_age": "0ms",
          "actions": { - 
            "set_priority": { - 
              "priority": 100
            }
          }
        },
        "warm": { - 
          "min_age": "5000d",
          "actions": { - 
            "allocate": { - 
              "include": { - 

              },
              "exclude": { - 

              },
              "require": { - 
                "tier": "warm"
              }
            },
            "set_priority": { - 
              "priority": 50
            }
          }
        }
      }
    }
  }
}

```

I set `hot-node-forever` to all my indices:

```auto
PUT logs-*/_settings
{
  "index": {
    "lifecycle": {
      "name": "hot-node-forever"
    }
  }
}

```

I then remove the cluster routing policy but the cluster starts to migrate indices to warm nodes. None of the indices are older than a year.

Am I doing this right? I did RTFM and it seems like this should work (only migrate if indices are older than 5000 days), but somehow it doesn't. What am I missing?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 2, 2021, 6:52am UTC](https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861/2 "2021-02-02T06:52:55Z")

</div>

> [@matejzero](#):
>
> ```auto
> "require": { - 
> "tier": "warm"
> }
> 
> ```

Don't you need to remove this part from the policy?

---

<div class="post-metadata">

**Author:** ![matejzero](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@matejzero](https://discuss.elastic.co/u/matejzero)\
**Post date:** [February 2, 2021, 10:00am UTC](https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861/3 "2021-02-02T10:00:55Z")

</div>

I expect this to say: keep indices on hot nodes, but migrate to warm nodes once they are older than 5000 days.

---

<div class="post-metadata">

**Author:** ![matejzero](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@matejzero](https://discuss.elastic.co/u/matejzero)\
**Post date:** [February 2, 2021, 10:14am UTC](https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861/4 "2021-02-02T10:14:16Z")

</div>

I decided to go with `index.routing.allocation.require.tier` setting and move all indices to hot nodes. I'll migrate to ILM only new indices once I have new templates ready.

---

<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 2, 2021, 10:14am UTC](https://discuss.elastic.co/t/ilm-keep-all-indices-on-hot-node/262861/5 "2021-03-02T10:14:58Z")

</div>

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