# How to avoid sending data to a node close to its disk space limit?

**URL:** <https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937>\
**Category:** Elasticsearch\
**Created:** [March 14, 2018, 3:34pm UTC](https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937 "2018-03-14T15:34:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmind](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fmind/32/34006_2.png) [@fmind](https://discuss.elastic.co/u/fmind)\
**Post date:** [March 14, 2018, 3:34pm UTC](https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937/1 "2018-03-14T15:34:35Z")

</div>

Hello,

My elasticsearch cluster has 4 nodes, but one node is close to its disk space limit.

I cannot add new nodes to my cluster due to budget constraints. So, I have to use space remaining on the other nodes.

What would you recommend ?

Should I stop the elastic search service on the node close its limit ?

Can I route the data to the other nodes with some setting ?

Should I mark the shards on the node as "ready-only" ?

Thanks !

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 15, 2018, 8:19am UTC](https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937/2 "2018-03-15T08:19:24Z")

</div>

By default, Elasticsearch will stop allocating new shards to a node once it exceeds 85% full, will relocate shards away from nodes that exceed 90% full, and will set things to read-only when 95% full. These settings are configurable: [https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html)

---

<div class="post-metadata">

**Author:** ![fmind](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fmind/32/34006_2.png) [@fmind](https://discuss.elastic.co/u/fmind)\
**Post date:** [March 15, 2018, 9:38am UTC](https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937/3 "2018-03-15T09:38:36Z")

</div>

Thank you for your answer

The documentation for `cluster.routing.allocation.disk.watermark.flood_stage`  
mentions that the **whole** index will be put in read-only mode if one shard exceeds the limit.

Is there another way to handle this scenario ? One of my node has much less disk space, and I don't want this node to be a bottleneck. Still, I want to use its resources for my analysis.

This is the disk space available on my nodes:

- node 1: 14 TB
- **node 2: 5 TB**
- node 3: 14 TB
- node 4: 14 TB

I already set the index settings to 7 shards, so that node 1, 3 and 4 hosts two shards and node 2 only one. Still, node 2 is close to its limit.

What would you recommend then ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 18, 2018, 8:56pm UTC](https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937/4 "2018-03-18T20:56:56Z")

</div>

> [@fmind](#):
>
> Is there another way to handle this scenario ?

Unfortunately not. It doesn't really make sense to mark a single shard as read-only. If Elasticsearch cannot write to one shard in an index, it cannot write to the index.

> [@fmind](#):
>
> What would you recommend then ?

Rely on `watermark.high` to move shards away from the full node before they hit `watermark.flood_stage`.

---

<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 15, 2018, 8:57pm UTC](https://discuss.elastic.co/t/how-to-avoid-sending-data-to-a-node-close-to-its-disk-space-limit/123937/5 "2018-04-15T20:57:37Z")

</div>

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