# \[Elasticsearch\]\[ILM\] Set readonly for warn phase is not working

**URL:** <https://discuss.elastic.co/t/elasticsearch-ilm-set-readonly-for-warn-phase-is-not-working/360230>\
**Category:** Elasticsearch\
**Created:** [May 26, 2024, 10:10am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-set-readonly-for-warn-phase-is-not-working/360230 "2024-05-26T10:10:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![david89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david89/32/133515_2.png) [@david89](https://discuss.elastic.co/u/david89)\
**Post date:** [May 26, 2024, 10:10am UTC](https://discuss.elastic.co/t/elasticsearch-ilm-set-readonly-for-warn-phase-is-not-working/360230/1 "2024-05-26T10:10:35Z")

</div>

Dear Bro,  
I am trying to set readonly for index in warn phase, using ILM but it is not readonly  
This is my setting

```auto
"warm": {
        "min_age": "2d",
        "actions": {
          "readonly": {}
        }
      },

```

Please help me to check it

---

<div class="post-metadata">

**Author:** ![Sajad\_Soltanian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sajad_soltanian/32/122022_2.png) [@Sajad\_Soltanian](https://discuss.elastic.co/u/Sajad_Soltanian)\
**Post date:** [May 26, 2024, 8:13pm UTC](https://discuss.elastic.co/t/elasticsearch-ilm-set-readonly-for-warn-phase-is-not-working/360230/2 "2024-05-26T20:13:59Z")

</div>

```auto
"min_age": "2d"

```

as its configured, your index might need to be at least two days old for the action to be applied.

take a look at [this.](https://discuss.elastic.co/t/the-age-of-index-which-is-using-ilm-policy-management/261198/7)

Notice: if you have used rollover action in your hot phase, the [index age will be calculated relative to the rollover time,](https://discuss.elastic.co/t/little-bit-confused-on-min-age-parameter-in-ilm/299049/5) not the index creation time.

what if you decrease the min\_age to something like 1 minute?
