elasticsearch - what to do with unassigned shards

后端 未结 7 1871
别跟我提以往
别跟我提以往 2020-11-28 21:54

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

I tried set cluster.routing.allocation.disable_allocation = false

7条回答
  •  囚心锁ツ
    2020-11-28 22:04

    With newer ES versions this should do the trick (run in Kibana DevTools):

    PUT /_cluster/settings
    {
      "transient" : {
        "cluster.routing.rebalance.enable" : "all"
      }
    }
    

    However, this won't fix the root cause. In my case there was lots of unassigned shards because default replica size was 1 but actually I was only using single node. So I also added to my elasticsearch.yml this line:

    index.number_of_replicas: 0
    

提交回复
热议问题