# How to completely remove indices from disks after shard filtering definition

**URL:** <https://discuss.elastic.co/t/how-to-completely-remove-indices-from-disks-after-shard-filtering-definition/180309>\
**Category:** Elasticsearch\
**Created:** [May 9, 2019, 8:04am UTC](https://discuss.elastic.co/t/how-to-completely-remove-indices-from-disks-after-shard-filtering-definition/180309 "2019-05-09T08:04:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aqiank](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aqiank/32/39723_2.png) [@aqiank](https://discuss.elastic.co/u/aqiank)\
**Post date:** [May 9, 2019, 8:04am UTC](https://discuss.elastic.co/t/how-to-completely-remove-indices-from-disks-after-shard-filtering-definition/180309/1 "2019-05-09T08:04:26Z")

</div>

Hi, I wanted to create a simple two-node hot-warm cluster for quick experimentation. One ("warm") with already 100+GB of sample data and the other ("hot") with zero data initially. But I forgot to set shard filtering for some of the indices so they also exist on the hot node. So I corrected it and it seemed to have been moved to the right node. However, when I check the disk usage, it still uses the same amount of disk space (about 1 gigabyte) as before even though I told the shards to go to the "warm" node. If I delete the data folder and re-run the "hot" node, the size becomes only a few hundred kilobytes as expected. Does anybody know what the problem is here or if there is an API to claim the disk space?

I'm using Elasticsearch 2.3.1.

Thanks!

---

<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:** [May 9, 2019, 8:06am UTC](https://discuss.elastic.co/t/how-to-completely-remove-indices-from-disks-after-shard-filtering-definition/180309/2 "2019-05-09T08:06:01Z")

</div>

> [@aqiank](#):
>
> I'm using Elasticsearch 2.3.1.

Side note - is there a reason you are using a version that is EOL?

---

<div class="post-metadata">

**Author:** ![aqiank](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aqiank/32/39723_2.png) [@aqiank](https://discuss.elastic.co/u/aqiank)\
**Post date:** [May 9, 2019, 8:27am UTC](https://discuss.elastic.co/t/how-to-completely-remove-indices-from-disks-after-shard-filtering-definition/180309/3 "2019-05-09T08:27:39Z")

</div>

Hi @warkolm, our production cluster is running on 2.3.1 so I'm using it locally as well to match.

---

<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:** [June 6, 2019, 8:27am UTC](https://discuss.elastic.co/t/how-to-completely-remove-indices-from-disks-after-shard-filtering-definition/180309/4 "2019-06-06T08:27:42Z")

</div>

Closed on June 6, 2019, 8:27am UTC

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