# Elasticsearch 7.10 : How to safely remove a node and free up space?

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624>\
**Category:** Elasticsearch\
**Created:** [December 14, 2020, 5:47pm UTC](https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624 "2020-12-14T17:47:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soumya\_Ranjan\_Sahoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soumya_ranjan_sahoo/32/80831_2.png) [@Soumya\_Ranjan\_Sahoo](https://discuss.elastic.co/u/Soumya_Ranjan_Sahoo)\
**Post date:** [December 14, 2020, 5:47pm UTC](https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624/1 "2020-12-14T17:47:36Z")

</div>

As I am running out of my disk space, I want to remove all the indices from the node. Note that I have just one node, and I am running the elastic server on my local machine.

Basically, when I start the elastic server, it fails with the following log -

`[2020-12-13T22:06:51,839][WARN][o.e.c.r.a.DiskThresholdMonitor] [sedna] flood stage disk watermark [95%] exceeded on [k7t835EJQ6KzPu-7a-aW8Q][sedna][/home/ssahoo/elasticsearch-7.10.0/data/nodes/0] free: 879mb[0.8%], all indices on this node will be marked read-only`

While on the terminal I get the following error -

```auto
   Could not rename log file 'logs/gc.log' to 'logs/gc.log.05' (Reserved).
(base) ssahoo@sedna:~/elasticsearch-7.10.0$ [2020-12-14T17:07:17,831][WARN][stderr] [sedna] Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.io.IOException: Input/output error
2020-12-14 17:07:17,848 main ERROR Unable to move file /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch_server.json to /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.json: java.nio.file.FileSystemException /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch_server.json -> /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.json: Disk quota exceeded
2020-12-14 17:07:17,852 main ERROR Unable to copy file /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch_server.json to /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.json: java.nio.file.FileSystemException /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.json: Disk quota exceeded
2020-12-14 17:07:17,857 main ERROR Unable to move file /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch.log to /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.log: java.nio.file.FileSystemException /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch.log -> /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.log: Disk quota exceeded
2020-12-14 17:07:17,861 main ERROR Unable to copy file /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch.log to /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.log: java.nio.file.FileSystemException /home/ssahoo/elasticsearch-7.10.0/logs/elasticsearch-2020-12-13-1.log: Disk quota exceeded
[2020-12-14T17:07:17,863][WARN][stderr] [sedna] Likely root cause: java.io.IOException: Input/output error
[2020-12-14T17:07:17,864][WARN][stderr] [sedna] at java.base/java.io.FileDescriptor.close0(Native Method)
[2020-12-14T17:07:17,864][WARN][stderr] [sedna] at java.base/java.io.FileDescriptor.close(FileDescriptor.java:297)

```

Therefore I want to free up space by removing all the indices, and therefore the node. So how can I remove the single node that I have?

Or if may I ask what would your suggestion be to overcome this? I can't afford additional disk space and is my major constraint.

Thank you.

---

<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:** [December 14, 2020, 9:00pm UTC](https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624/2 "2020-12-14T21:00:33Z")

</div>

Welcome to our community! 😃

You can remove indicies from Elasticsearch by using the API as per [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html).

---

<div class="post-metadata">

**Author:** ![Soumya\_Ranjan\_Sahoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soumya_ranjan_sahoo/32/80831_2.png) [@Soumya\_Ranjan\_Sahoo](https://discuss.elastic.co/u/Soumya_Ranjan_Sahoo)\
**Post date:** [December 16, 2020, 9:49am UTC](https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624/3 "2020-12-16T09:49:11Z")

</div>

Thank you.

I have 2 follow up questions here -

1. How do I get to know the name of all the indices that are created?

2. I have created my indices using the following put request with the index name being bm25

```auto
requests.put('http://localhost:9200/bm25', data=json.dumps(settings), headers=headers) 

```

So, how do I delete an index (the above bm25, for instance) using python? Can you help me with an equivalent python syntax, please?

---

<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:** [December 16, 2020, 9:24pm UTC](https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624/4 "2020-12-16T21:24:28Z")

</div>

1. Look at the `_cat/indices?v` endpoint.
2. [https://elasticsearch-py.readthedocs.io/en/v7.10.1/api.html?highlight=delete#elasticsearch.client.IndicesClient.delete](https://elasticsearch-py.readthedocs.io/en/v7.10.1/api.html?highlight=delete#elasticsearch.client.IndicesClient.delete) looks like it.

---

<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:** [January 13, 2021, 9:24pm UTC](https://discuss.elastic.co/t/elasticsearch-7-10-how-to-safely-remove-a-node-and-free-up-space/258624/5 "2021-01-13T21:24:33Z")

</div>

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