elasticsearch - 如何处理未分配的分片 [英] elasticsearch - what to do with unassigned shards

查看:32
本文介绍了elasticsearch - 如何处理未分配的分片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的集群处于黄色状态,因为一些分片未分配.怎么办?

my cluster is with yellow status because some shards are unassigned. what to do with this?

我尝试将 cluster.routing.allocation.disable_allocation = false 设置为所有索引,但我认为这不起作用,因为我使用的是 1.1.1 版.

I tried set cluster.routing.allocation.disable_allocation = false to all indexes, but I think this don't work because I'm using version 1.1.1.

我也尝试过重新启动所有机器,但发生了同样的情况.

I also tried restarting all machines, but same happens.

有什么想法吗?

  • 集群统计:

  • Cluster stat :

{ 
  cluster_name: "elasticsearch",
  status: "red",
  timed_out: false,
  number_of_nodes: 5,
  number_of_data_nodes: 4,
  active_primary_shards: 4689,
  active_shards: 4689,
  relocating_shards: 0,
  initializing_shards: 10,
  unassigned_shards: 758
}

推荐答案

那些未分配的分片实际上是来自主节点的实际分片的未分配副本.

Those unassigned shards are actually unassigned replicas of your actual shards from the master node.

为了分配这些分片,您需要运行一个新的elasticsearch实例来创建一个辅助节点来承载数据副本.

In order to assign these shards, you need to run a new instance of elasticsearch to create a secondary node to carry the data replicas.

有时未分配的分片属于已删除的索引,这使得它们成为无论是否添加节点都永远不会分配的孤立分片.但这里不是这样!

Sometimes the unassigned shards belongs to indexes that have been deleted making them orphan shards that will never assign regardless of adding nodes or not. But it's not the case here!

这篇关于elasticsearch - 如何处理未分配的分片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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