# Space consumption after reindex

**URL:** <https://discuss.elastic.co/t/space-consumption-after-reindex/269618>\
**Category:** Elasticsearch\
**Created:** [April 8, 2021, 3:15pm UTC](https://discuss.elastic.co/t/space-consumption-after-reindex/269618 "2021-04-08T15:15:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![speechkey](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@speechkey](https://discuss.elastic.co/u/speechkey)\
**Post date:** [April 8, 2021, 3:15pm UTC](https://discuss.elastic.co/t/space-consumption-after-reindex/269618/1 "2021-04-08T15:15:16Z")

</div>

Hi folks

we are trying to migrate from 5.5.1 to 7.10.2. After upgrade to 6.8 I'm trying to reindex indices which were created on 5.5.1.

```
curl -sq -X POST "http://elasticsearch:9200/_reindex?pretty" -H 'Content-Type: application/json' -d"
  {
    \"source\": {
      \"index\": \"filebeat-2021.03.10\"
    },
    \"dest\": {
      \"index\": \"reindexed-filebeat-2021.03.10\"
    }
  }"

```

After reindex I create an alias and remove the source index:

```
  curl -sq -X POST "http://elasticsearch:9200/_aliases?pretty" -H 'Content-Type: application/json' -d"
  {
    \"actions\": [{
      \"add\": {
        \"index\": \"reindexed-filebeat-2021.03.10\",
        \"alias\": \"filebeat-2021.03.10\"
      }
    },
    {
      \"remove_index\": {
        \"index\": \"filebeat-2021.03.10\"
      }
    }]
  }"

```

When I started the server had 66% free hdd space. After reindex the half of all source indices, I have only 15% free hdd space. Desprite the new index consumes mostly less space than the source one. Where the space goes?

I've tried already force merge:

```
curl -XPOST http://elasticsearch:9200/_forcemerge

```

and with only\_expunge\_deletes:

```
curl -sq -XPOST http://elasticsearch:9200/_forcemerge?only_expunge_deletes=true

```

Nothing helps. Does anyone has an idea?

Best regards  
speechkey

---

<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:** [April 12, 2021, 1:34am UTC](https://discuss.elastic.co/t/space-consumption-after-reindex/269618/2 "2021-04-12T01:34:08Z")

</div>

What's the output from `_cat/nodes?v`?

---

<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:** [April 12, 2021, 2:37am UTC](https://discuss.elastic.co/t/space-consumption-after-reindex/269618/3 "2021-04-12T02:37:43Z")

</div>

Given that you have changed the index prefix I would suspect the Filebeat index templates might not apply which could mean you are using default mappings, which can take up more space. Compare the mappings for an old index with a reindexed one and see if there are any significant differences.

---

<div class="post-metadata">

**Author:** ![speechkey](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@speechkey](https://discuss.elastic.co/u/speechkey)\
**Post date:** [April 12, 2021, 7:25am UTC](https://discuss.elastic.co/t/space-consumption-after-reindex/269618/4 "2021-04-12T07:25:27Z")

</div>

Thanks for replies. The problem disappears over night.

---

<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:** [May 10, 2021, 7:25am UTC](https://discuss.elastic.co/t/space-consumption-after-reindex/269618/5 "2021-05-10T07:25:38Z")

</div>

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