# Can't set a replication factor for some hidden indices

**URL:** <https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [August 28, 2023, 10:37pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839 "2023-08-28T22:37:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [August 28, 2023, 10:37pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839/1 "2023-08-28T22:37:47Z")

</div>

Hi,

I can't seem to change a replication factor for some hidden indices:

i.e.

```auto
curl -X PUT "x.x.x.x:9200/.*/_settings" -H 'Content-Type: application/json' -d'{ "index" : { "number_of_replicas" : 2 } }'
{"acknowledged":true}%

```

affects only .elastichq index, other two keep the same replication factor 1

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .ds-.logs-deprecation.elasticsearch-default-2023.08.01-000017 ffEIhEmISlm66_OOFZMlvQ 1 1 111 0 140.7kb 70.3kb
green open .ds-ilm-history-5-2023.08.01-000016 8aAiHp7YRl-8w_77ockRuw 1 1 18 0 45.4kb 22.6kb
green open .elastichq aDkgWHjaSfKiCAZ_60_2nw 1 2 1 0 27.5kb 6.8kb

```

---

<div class="post-metadata">

**Author:** ![angelo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/angelo/32/61325_2.png) [@angelo](https://discuss.elastic.co/u/angelo)\
**Post date:** [September 1, 2023, 6:31pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839/2 "2023-09-01T18:31:57Z")

</div>

Check the `_settings` on those 2 indices, my guess is that they both have `"auto_expand_replicas": "0-1"` set which will override the `number_of_replicas` value you are trying to set. You will need to remove/unset that setting for the indices to increase replicas to 2, etc.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [September 1, 2023, 7:12pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839/3 "2023-09-01T19:12:09Z")

</div>

Thanks, so I can modify "auto\_expand\_replicas": "false".

Can I directly set replication factor for all future .ilm system indexes? As ilm keeps creating new indexes every X days or can I disable creation of .ilm indexes completely? So far I tried to turn off ilm but it doesn't allow me to remove the existing index.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 1, 2023, 7:14pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839/4 "2023-09-01T19:14:08Z")

</div>

Try

`"auto_expand_replicas": null`

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://discuss.elastic.co/u/Vadym)\
**Post date:** [September 5, 2023, 6:26pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839/5 "2023-09-05T18:26:52Z")

</div>

I can confirm that **auto\_expand\_replicas** override **number\_of\_replicas**. So I can expand # of replicas by setting **auto\_expand\_replicas** i.e. to "0-2".

If I have new .ilm indexes created can you point me where to set **auto\_expand\_replicas** for all new future indexes?

---

<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:** [October 3, 2023, 6:27pm UTC](https://discuss.elastic.co/t/cant-set-a-replication-factor-for-some-hidden-indices/341839/6 "2023-10-03T18:27:11Z")

</div>

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