ElasticSearch: Unassigned Shards, how to fix?

前端 未结 24 1195
悲&欢浪女
悲&欢浪女 2020-12-04 05:03

I have an ES cluster with 4 nodes:

number_of_replicas: 1
search01 - master: false, data: false
search02 - master: true, data: true
search03 - master: false,          


        
24条回答
  •  再見小時候
    2020-12-04 05:22

    In my case, the hard disk space upper bound was reached.

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

    Basically, I ran:

    PUT /_cluster/settings
    {
      "transient": {
        "cluster.routing.allocation.disk.watermark.low": "90%",
        "cluster.routing.allocation.disk.watermark.high": "95%",
        "cluster.info.update.interval": "1m"
      }
    }
    

    So that it will allocate if <90% hard disk space used, and move a shard to another machine in the cluster if >95% hard disk space used; and it checks every 1 minute.

提交回复
热议问题