悟空,拿我的打狗棒来

ES 参数:cluster.routing.allocation.disk.watermark.low的问题。请教

Elasticsearch | 作者 sterne vencel | 发布于2018年07月15日 | 阅读数:7132

ES版本为5.6.4
配置参数中有“cluster.routing.allocation.disk.watermark.low”这个设置,这个配置是控制节点磁盘容量达到这个值则集群不在向这个节点分配分片。但是在官方说明中对这一项的解释中有这么一句话(文中黑体字)。这句话的意思不理解。意思是当节点磁盘容量达到这个值后,如果有个新建的索引,那么这个索引的分片还是有可能被分配到这个节点的是吗?cluster.routing.allocation.disk.watermark.low
Controls the low watermark for disk usage. It defaults to 85%, meaning that Elasticsearch will not allocate shards to nodes that have more than 85% disk used. It can also be set to an absolute byte value (like 500mb) to prevent Elasticsearch from allocating shards if less than the specified amount of space is available. This setting has no effect on the primary shards of newly-created indices or, specifically, any shards that have never previously been allocated.
cluster.routing.allocation.disk.watermark.high
Controls the high watermark. It defaults to 90%, meaning that Elasticsearch will attempt to relocate shards away from a node whose disk usage is above 90%. It can also be set to an absolute byte value (similarly to the low watermark) to relocate shards away from a node if it has less than the specified amount of free space. This setting affects the allocation of all shards, whether previously allocated or not.
已邀请:

JackGe

赞同来自: CarrieJin

cluster.routing.allocation.disk.watermark.low这个设置对新创建索引的主shard是不起作用的。如果集群中所有节点磁盘水位达到85%,有新创建的索引需要进行分配,此时新创建的索引主shard正常分配,而其副本无法分配导致集群状态为yellow。
 
cluster.routing.allocation.disk.watermark.high这个配置指磁盘水位达到90%的节点,es会把该节点上的部分shard迁移到磁盘水位低的节点上去。

要回复问题请先登录注册