Disk space full elasticsearch

After I deleted all the indices the disk space is still almost full, no place is freed up. I tried ```
curl -XPOST 'http://localhost:9200/_forcemerge?only_expunge_deletes=true', but still the disk has same amount. Is there any place where the indices are stored locally so i can delete them? I had almost half disk space free, but when I started to use elasticsearch it got almost full real fast. How to reclaim the disk space, any solution for this ?

Which command did you use to delete the indices?
Are you sure it's elasticsearch data dir which is filling your space?

Because I dont have any instalation, I deleted them from extracted elasticsearch folder ( data-> nodes->0 -> indices). Im totally sure elasticsearch is filling my space.

So you didn't use the

DELETE index 


Why this?

If you don't care anything about your data, just remove the data dir and start elasticsearch.

1 Like

No I did not use DELETE Index. Where I can find data dir ? I am new to elasticsearch so Im kinda confused why is this happening. I cant even create new index because I dont have space in my disk. A already deleted all indices indices in data dir ( if data-> nodes->0 -> indices is the path of that )

Data dir is the one you mentioned yourself:

data-> nodes->0 -> indices

Remove it.

But never ever do that again. I mean some manual commands. Use the API instead.

Already did, still the disk is full, deleted even some big programs in my laptop, but when I run elasticsearch/logstash it fills it up again. Maybe I will need to format laptop, i tried everything and cant find solution

It's unclear what you are doing/seeing.
Which version are you using?

I was testing a lot of data, and I ingested I lot of csv files through logstash, I had maybe 30 indices. I had around 150gb free space, now I have only 8gb space left on the disk. I thought if I delete the indices through data dir, it will free up the space on my disk but even after deleting, the disk is still full. So they are still stored somewhere, and I cant find where. I tried different solutions that I read up but its still the same. I have now 0 indices, 0 shards. Disk still full. Maybe it keeps logs from logstash somewhere because I used stdout ruby debug codec, I dont know, but something is keeping up the memory... I use version 7.0.0

So it's not elasticsearch then.

That being said, I'd not use 7.0.0 but 7.6.0.
Many things have been fixed since 7.0.

Then may be look at logstash dir indeed.
I'm sure you can find which dir contains so many data with a du -s command or df -k.

Did you try to restart elastic? If you deleted the files directly on the disk elastic may still hold the files open. They won't free the space until handles are released. If you used elastic API this wouldn't be a problem.

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