# ILM phases rolling out index but keeping

**URL:** <https://discuss.elastic.co/t/ilm-phases-rolling-out-index-but-keeping/272291>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 6, 2021, 12:27pm UTC](https://discuss.elastic.co/t/ilm-phases-rolling-out-index-but-keeping/272291 "2021-05-06T12:27:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![narendraingale2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narendraingale2/32/92111_2.png) [@narendraingale2](https://discuss.elastic.co/u/narendraingale2)\
**Post date:** [May 6, 2021, 12:27pm UTC](https://discuss.elastic.co/t/ilm-phases-rolling-out-index-but-keeping/272291/1 "2021-05-06T12:27:14Z")

</div>

Hi All  
Below is my ILM policy

```auto
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "200gb",
            "max_age": "7d"
          },
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "7d",
        "actions": {
          "allocate": {
            "require": {
              "data": "warm"
            }
          },
          "readonly": {},
          "set_priority": {
            "priority": 50
          }
        }
      },
      "delete": {
        "min_age": "23d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

```

This policy rolls over index after 7 days but it is not moving index to warm nodes as rollover reset age of index to 0.

We are expecting to keep 7day old data on hot nodes irrespective size of the index after 7 days data needs to be moved to warm nodes and then ILM should delete the data after 30 days, but right now on hot node data is getting rolled out after 7 days and index age is getting reset to 0 and we have to wait 7 more days to move this data to warm.  
Is there any work around for this ? we can keep rolled over indices on hot nodes for 7 days and then we can move them to warm nodes.

---

<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:** [May 10, 2021, 1:02am UTC](https://discuss.elastic.co/t/ilm-phases-rolling-out-index-but-keeping/272291/2 "2021-05-10T01:02:32Z")

</div>

Welcome to our community! 😃

What's the output from `GET /_cat/nodeattrs?v`?

---

<div class="post-metadata">

**Author:** ![andreidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreidan/32/78167_2.png) [@andreidan](https://discuss.elastic.co/u/andreidan)\
**Post date:** [May 10, 2021, 1:27pm UTC](https://discuss.elastic.co/t/ilm-phases-rolling-out-index-but-keeping/272291/3 "2021-05-10T13:27:21Z")

</div>

Thanks for using Elasticsearch.

If you'd like the phase transition timings to **always** (irrespective of rollover) be calculated based on a specific date you can use the origination date as described [here](https://www.elastic.co/blog/control-ilm-phase-transition-timings-using-origination-date)

Another option is to set the `min_age` to `0` for the `warm` phase. That would translate into "move to the warm phase immediately after rollover". However, this option comes with the caveat that the rollover might be triggered by the `"max_size": "200gb"` condition in your rollover action before the `"max_age" : "7d"` is fulfilled if you experience a high (unexpected?) write load. This would mean that the index might advance to the `warm` (and consequently to the `delete`) phase earlier than expected. For eg if the `warm` phase `min_age` was `0` it could happen that `myindex-000001` is rolled over after 5 days (as it reached `200gb`), transitions immediately to the warm phase and execute the actions configured there and is deleted after 28 days (as the `min_age` of the `delete` phase is `23d` + `5d` which was the age at which the index was rolled over)

---

<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:27pm UTC](https://discuss.elastic.co/t/ilm-phases-rolling-out-index-but-keeping/272291/4 "2021-06-07T13:27:59Z")

</div>

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