# Break up large index into multiple smaller equally sized indexes?

**URL:** <https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745>\
**Category:** Elasticsearch\
**Created:** [March 1, 2021, 3:25am UTC](https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745 "2021-03-01T03:25:16Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![stevedwray](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@stevedwray](https://discuss.elastic.co/u/stevedwray)\
**Post date:** [March 3, 2021, 10:46pm UTC](https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745/21 "2021-03-03T22:46:42Z")

</div>

```auto
PUT _ilm/policy/split_large_index
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "50gb",
            "max_age": "1d"
          },
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "0d",
        "actions": {}
      }
    }
  }
}

```

This is how I attached it to the index:

```auto
PUT packetbeat-7.10.0-2021.01.20-000099/_settings 
{
  "index": {
    "lifecycle": {
      "name": "split_large_index"
    }
  }
}

```

---

<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:** [March 4, 2021, 12:16am UTC](https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745/22 "2021-03-04T00:16:51Z")

</div>

Based on that index name - `packetbeat-7.10.0-2021.01.20-000099` - it would suggest that is already using ILM, which is the default for Beats, so that makes sense. So you won't be able to just attach the policy to the index like that, because it won't be being written into.  
(I should have asked what sort of data it was to begin with!)

What is the actual age and size of that index?

---

<div class="post-metadata">

**Author:** ![stevedwray](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@stevedwray](https://discuss.elastic.co/u/stevedwray)\
**Post date:** [March 4, 2021, 12:45am UTC](https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745/23 "2021-03-04T00:45:31Z")

</div>

No, it isn't being written into.  
The index covers 20/01/2021 through 27/01/2021, its about 250G with 2 replicas, so about 500G in total, 656 million documents. I need to remove the flow event.dataset from this. The rest of the documents are about 102 million.

---

<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:** [April 1, 2021, 12:45am UTC](https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745/24 "2021-04-01T00:45:31Z")

</div>

Closed on April 1, 2021, 12:45am UTC

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

[Previous page](https://discuss.elastic.co/t/break-up-large-index-into-multiple-smaller-equally-sized-indexes/265745.md?page=1)
