低磁盘水印 [??%] 超出 [英] low disk watermark [??%] exceeded on

查看:22
本文介绍了低磁盘水印 [??%] 超出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的开发机器(单个笔记本)中使用 Elasticsearch 1.4.4.一切都设置为默认值,因为我从未更改过任何设置.

I use Elasticsearch 1.4.4 in my development machine (a single notebook). Everything is set as default because I never changed any settings.

当我启动它时,我通常会收到以下消息:

When I start it, I usually get the following message:

[2015-10-27 09:38:31,588][INFO ][node                     ] [Milan] version[1.4.4], pid[33932], build[c88f77f/2015-02-19T13:05:36Z]
[2015-10-27 09:38:31,588][INFO ][node                     ] [Milan] initializing ...
[2015-10-27 09:38:31,592][INFO ][plugins                  ] [Milan] loaded [], sites []
[2015-10-27 09:38:34,665][INFO ][node                     ] [Milan] initialized
[2015-10-27 09:38:34,665][INFO ][node                     ] [Milan] starting ...
[2015-10-27 09:38:34,849][INFO ][transport                ] [Milan] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.81.1.108:9300]}
[2015-10-27 09:38:35,022][INFO ][discovery                ] [Milan] elasticsearch/DZqnmWIZRpapZY_TPkkMBw
[2015-10-27 09:38:38,787][INFO ][cluster.service          ] [Milan] new_master [Milan][DZqnmWIZRpapZY_TPkkMBw][THINKANDACT1301][inet[/10.81.1.108:9300]], reason: zen-disco-join (elected_as_master)
[2015-10-27 09:38:38,908][INFO ][http                     ] [Milan] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.81.1.108:9200]}
[2015-10-27 09:38:38,908][INFO ][node                     ] [Milan] started
[2015-10-27 09:38:39,220][INFO ][gateway                  ] [Milan] recovered [4] indices into cluster_state
[2015-10-27 09:39:08,801][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
[2015-10-27 09:39:38,798][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
[2015-10-27 09:40:08,801][INFO ][cluster.routing.allocation.decider] [Milan] low disk watermark [15%] exceeded on [DZqnmWIZRpapZY_TPkkMBw][Milan] free: 58.6gb[12.6%], replicas will not be assigned to this node
....

我看到很多这些低磁盘水印...超出..."消息.我的情况出了什么问题?如何解决?谢谢!

I see a lot of these "low disk watermark ... exceeded on..." messages. What went wrong in my case? How to fix it? Thanks!

更新

在这篇文章之前,我搜索了相关帖子.我发现了一个与高水印..."有关的问题,在这种情况下,磁盘空间不足.就我而言,我检查了一下,我的磁盘上还有 56GB 剩余空间.

Before this post, I searched SO for related posts. I found one related to "high watermark..." and in that case, the disk space is low. In my case, I checked and there is still 56GB left on my disk.

更新

根据 Andrei Stefan 的输入,我需要更改设置.我应该这样做吗:

According to the input from Andrei Stefan, I need to change settings. Should I do it the following way:

curl -XPUT localhost:9200/_cluster/settings -d '{
    "transient" : {
        "cluster.routing.allocation.disk.threshold_enabled" : false
    }
}'

或者是否有任何我可以编辑的设置文件来设置它?

Or is there any settings file I can edit to set it?

推荐答案

如果你像我一样有很多磁盘,你可以调整水印设置并使用字节值而不是百分比:

If you like me have a lot of disk you can tune the watermark setting and use byte values instead of percentages:

注意!您不能在这些设置中混合使用百分比值和字节值.要么全部设置为百分比值,要么全部设置为字节值.

NB! You can not mix the usage of percentage values and byte values within these settings. Either all are set to percentage values, or all are set to byte values.

设置:cluster.routing.allocation.disk.watermark.low

控制磁盘使用的低水印.它默认为 85%,这意味着一旦节点使用了超过 85% 的磁盘,ES 将不会为节点分配新的分片.它也可以设置为绝对字节值(如 500mb),以防止 ES 在可用空间少于配置量时分配分片.

Controls the low watermark for disk usage. It defaults to 85%, meaning ES will not allocate new shards to nodes once they have more than 85% disk used. It can also be set to an absolute byte value (like 500mb) to prevent ES from allocating shards if less than the configured amount of space is available.

设置:cluster.routing.allocation.disk.watermark.high

控制高水印.它默认为 90%,这意味着如果节点磁盘使用率上升到 90% 以上,ES 将尝试将分片重新定位到另一个节点.也可以将其设置为绝对字节值(类似于低水位线)以在节点上可用空间少于配置的空间量时重新定位分片.

Controls the high watermark. It defaults to 90%, meaning ES will attempt to relocate shards to another node if the node disk usage rises above 90%. It can also be set to an absolute byte value (similar to the low watermark) to relocate shards once less than the configured amount of space is available on the node.

设置::cluster.routing.allocation.disk.watermark.flood_stage

控制洪水阶段水印.它默认为 95%,这意味着 Elasticsearch 在每个索引上强制执行只读索引块 (index.blocks.read_only_allow_delete),该索引在至少一个磁盘超过泛滥阶段的节点上分配了一个或多个分片.这是防止节点耗尽磁盘空间的最后手段.一旦有足够的可用磁盘空间以允许索引操作继续,索引块必须手动释放.

Controls the flood stage watermark. It defaults to 95%, meaning that Elasticsearch enforces a read-only index block (index.blocks.read_only_allow_delete) on every index that has one or more shards allocated on the node that has at least one disk exceeding the flood stage. This is a last resort to prevent nodes from running out of disk space. The index block must be released manually once there is enough disk space available to allow indexing operations to continue.

https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html

请注意:

百分比值是指已用磁盘空间,而字节值是指可用磁盘空间.这可能会令人困惑,因为它颠倒了高和低的含义.例如,可以将低水印设置为 10gb,将高水印设置为 5gb,反之则不然.

Percentage values refer to used disk space, while byte values refer to free disk space. This can be confusing, since it flips the meaning of high and low. For example, it makes sense to set the low watermark to 10gb and the high watermark to 5gb, but not the other way around.

在我设置的 5TB 磁盘上:

On my 5TB disk I've set:

# /etc/elasticsearch/elasticsearch.yml
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.flood_stage: 5gb
cluster.routing.allocation.disk.watermark.low: 30gb
cluster.routing.allocation.disk.watermark.high: 20gb

添加 cluster.routing.allocation.disk.watermark.flood_stage 作为其他答案.

Added cluster.routing.allocation.disk.watermark.flood_stage as pr other answer.

这篇关于低磁盘水印 [??%] 超出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆