# ILM: issue while trying to set replica:0

**URL:** <https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [December 2, 2020, 10:47pm UTC](https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424 "2020-12-02T22:47:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppuschmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppuschmann/32/146751_2.png) [@ppuschmann](https://discuss.elastic.co/u/ppuschmann)\
**Post date:** [December 2, 2020, 10:47pm UTC](https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424/1 "2020-12-02T22:47:10Z")

</div>

We're using the following ILM-policy with success.

```auto
PUT _ilm/policy/technical
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "5d",
        "actions": {
          "allocate": {
            "number_of_replicas": 1,
            "include": {},
            "exclude": {},
            "require": {
              "box_type": "warm"
            }
          },
          "forcemerge": {
            "max_num_segments": 1
          },
          "readonly": {},
          "set_priority": {
            "priority": 50
          }
        }
      },
      "cold": {
        "min_age": "14d",
        "actions": {
          "allocate": {
            "number_of_replicas": 0,
            "include": {},
            "exclude": {},
            "require": {
              "box_type": "warm"
            }
          },
          "set_priority": {
            "priority": 40
          }
        }
      },
      "delete": {
        "min_age": "21d",
        "actions": {
          "delete": {
            "delete_searchable_snapshot": true
          }
        }
      }
    }
  }
}

```

^ generated by ILM Web-UI

There's only one glitch in the plan: during cold-phase the replica-count isn't lowered to 0.

We tried to apply the changes via API and Web-UI -\> settings were not stored.

We're using version 7.10.0

Is this a known bug or is this just not possible?

---

<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:** [December 2, 2020, 11:08pm UTC](https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424/2 "2020-12-02T23:08:39Z")

</div>

What's the output from the `technical/_ilm/explain` endpoint?

---

<div class="post-metadata">

**Author:** ![ppuschmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppuschmann/32/146751_2.png) [@ppuschmann](https://discuss.elastic.co/u/ppuschmann)\
**Post date:** [December 2, 2020, 11:28pm UTC](https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424/3 "2020-12-02T23:28:25Z")

</div>

```auto
"technical-2020.11.18": {
          "index": "technical-2020.11.18",
          "managed": true,
          "policy": "technical",
          "lifecycle_date_millis": 1605657600340,
          "age": "14.97d",
          "phase": "cold",
          "phase_time_millis": 1606867201026,
          "action": "complete",
          "action_time_millis": 1606867207740,
          "step": "complete",
          "step_time_millis": 1606867207740,
          "phase_execution": {
              "policy": "technical",
              "phase_definition": {
                  "min_age": "14d",
                  "actions": {
                      "freeze": {},
                      "allocate": {
                          "number_of_replicas": 0,
                          "include": {},
                          "exclude": {},
                          "require": {
                              "box_type": "warm"
                          }
                      },
                      "set_priority": {
                          "priority": 40
                      }
                  }
              },
              "version": 29,
              "modified_date_in_millis": 1606897278047
          }
      },

```

as a snippet. I currently wonder if I maybe manually configured this index to have no replica...

Very nice.

I was so sure the `/_ilm/policy/technical` didn't show `"number_of_replicas": 0,`.

What a misery. Sorry

At least the webui is showing only this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/8/18308d7d1719cd9678801e655b2df83246c9e0b7.png)

So I'd read this as "don't modify replica-settings".

---

<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:** [December 3, 2020, 1:43am UTC](https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424/4 "2020-12-03T01:43:29Z")

</div>

If you're all sorted then, not a problem! 🙂

---

<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:** [December 31, 2020, 1:43am UTC](https://discuss.elastic.co/t/ilm-issue-while-trying-to-set-replica-0/257424/5 "2020-12-31T01:43:35Z")

</div>

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