# Index rollover not working

**URL:** <https://discuss.elastic.co/t/index-rollover-not-working/317750>\
**Category:** Elasticsearch\
**Created:** [October 30, 2022, 10:16am UTC](https://discuss.elastic.co/t/index-rollover-not-working/317750 "2022-10-30T10:16:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eran\_Hadad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eran_hadad/32/102407_2.png) [@Eran\_Hadad](https://discuss.elastic.co/u/Eran_Hadad)\
**Post date:** [October 30, 2022, 10:16am UTC](https://discuss.elastic.co/t/index-rollover-not-working/317750/1 "2022-10-30T10:16:49Z")

</div>

I have an index, let's call it **index-name-000001** , current size **30gb**.  
**Aliases** index-name  
**Current action** rollover  
under phase definition:

```auto
 "actions": {
      "rollover": {
        "max_primary_shard_size": "20gb"
      },

```

under setting I also have rollover alias defined:

"index": {  
"lifecycle": {  
"name": "index-name-policy",  
"rollover\_alias": "index-name"  
},

What am I missing, why is the rollover not working?  
Do I need to manually create the follower index - **index-name-000002** , what's the point in that if I need to do it manually.

Any help will be much appreciated .

Thanks!

---

<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:** [October 30, 2022, 10:37am UTC](https://discuss.elastic.co/t/index-rollover-not-working/317750/2 "2022-10-30T10:37:13Z")

</div>

Do you have a replica in place and more than one data node in your cluster?

If that is the case you need to notice the difference between index size (size of primary and replica shards) and primary shard size (which is what is configured in your policy).

---

<div class="post-metadata">

**Author:** ![Eran\_Hadad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eran_hadad/32/102407_2.png) [@Eran\_Hadad](https://discuss.elastic.co/u/Eran_Hadad)\
**Post date:** [October 30, 2022, 11:08am UTC](https://discuss.elastic.co/t/index-rollover-not-working/317750/3 "2022-10-30T11:08:37Z")

</div>

Yes I have 2 data nodes and replica is configured as:  
`number_of_replicas": "1"`  
So I guess you are correct.  
I've also noticed that under the STATE tab I see

```auto
"store": {
        "size_in_bytes": 16134903418

```

Which is 16GB, so it makes sense.

Thanks a lot for the help, I feel silly I've missed that.

---

<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:** [November 27, 2022, 11:09am UTC](https://discuss.elastic.co/t/index-rollover-not-working/317750/4 "2022-11-27T11:09:10Z")

</div>

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