Elasticsearch 磁盘分区触发的低水印设置 [英] Elasticsearch Low watermark setting triggered by disk partitions

查看:55
本文介绍了Elasticsearch 磁盘分区触发的低水印设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的索引处于黄色"状态,因为有一个分片未分配.我的三个数据节点总体上有足够的磁盘空间,但它们是分区的.每个数据节点有三个磁盘分区,分别称为/data1/data2/data3.Elasticsearch 只在 /data1 上存储分片.关注这个页面 从手册中,我修改了头节点上的 elasticsearch.yml 以包含以下内容:

My index is in 'yellow' state because one shard is unassigned. My three data nodes have plenty of disk space overall but they are partitioned. Each data node has three disk partitions called /data1, /data2 and /data3. Elasticsearch is only storing shards on /data1. Following this page from the manual, I modified elasticsearch.yml on the head node to include the following:

path.data:/data1/elasticsearch、/data2/elasticsearch_2、/data3/elasticsearch_3

然后跑:

curl -XPOST "localhost:9200/_cluster/reroute?retry_failed"

尝试重新分配碎片.但是,我收到警告 节点高于低水印集群设置 [cluster.routing.allocation.disk.watermark.low=85% 来自节点和 分片不能从第三个数据节点分配到已经存在分片副本的同一节点.

To try and re-allocate the shards. However, I am getting the warning the node is above the low watermark cluster setting [cluster.routing.allocation.disk.watermark.low=85% from to of the nodes and the shard cannot be allocated to the same node on which a copy of the shard already exists from the third data node.

该集群上还有一个小得多的索引,处于绿色状态.

There is a second, much smaller index also on this cluster, which in green status.

我的问题是,当第一个分区已满时,如何让 Elasticsearch 在数据节点的附加分区上存储分片?每个分区本身都足够大,可以存储一个分片,但我认为因为我在一个分区中有多个索引的数据,它会触发警告并阻止副本分片的分发.

My question is, how can I get Elasticsearch to store shards on the additional partitions of the data nodes when the first partition is full? Each partition by itself is large enough to store one shard but I think because I have data for multiple indices in one partition it is triggering the warning and preventing the distribution of the replica shards.

推荐答案

当集群为黄色时索引无法重新定位.我建议将 number_of_replica 设置为 0 和 set cluster.routing.allocation.disk.watermark.lowcluster.routing.allocation.disk.watermark.high 到 95%.然后等待索引重新定位.然后将这些设置设为默认值(1、85%、95%).

indices cannot relocated when cluster is yellow. I recommend to set number_of_replica to 0 and set cluster.routing.allocation.disk.watermark.low and cluster.routing.allocation.disk.watermark.high to 95%. then wait for indices relocated. after that set these setting to defaults (1, 85%, 95%).

注意 cluster.routing.allocation.total_shards_per_node 默认为 -1 并检查其值.

note that cluster.routing.allocation.total_shards_per_node default is -1 and check its value.

这篇关于Elasticsearch 磁盘分区触发的低水印设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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