zoukankan      html  css  js  c++  java
  • 解决Elasticsearch索引只读(read-only)

    原因为:es 的设置默认是 85% 和 90 %,95%

    当为85%时:Elasticsearch不会将碎片分配给磁盘使用率超过85%的节点( cluster.routing.allocation.disk.watermark.low)

    当为90%时:Elasticsearch尝试重新分配给磁盘低于使用率90%的节点(cluster.routing.allocation.disk.watermark.high)

    当为85%时:Elasticsearch执行只读模块(cluster.routing.allocation.disk.watermark.flood_stage)

    1、扩大磁盘或者删除部分历史索引

    2、重置改只读索引快

    某一个索引重置只读模块
    PUT /twitter/_settings { "index.blocks.read_only_allow_delete": null }
    所有索引重置只读模块
    PUT /_all/_settings
    {
      "index.blocks.read_only_allow_delete": null
    }
    PUT /_cluster/settings
    {
      "persistent" : {
        "cluster.blocks.read_only" : false
      }
    }

    修改默认设置

    可以修改为具体的磁盘空间值,也可以修改为百分之多少
    临时修改
    PUT _cluster/settings { "transient": { "cluster.routing.allocation.disk.watermark.low": "100gb", "cluster.routing.allocation.disk.watermark.high": "50gb", "cluster.routing.allocation.disk.watermark.flood_stage": "10gb", "cluster.info.update.interval": "1m" } }
    永久修改
    PUT _cluster/settings { "persistent": { "cluster.routing.allocation.disk.watermark.low": "100gb", "cluster.routing.allocation.disk.watermark.high": "50gb", "cluster.routing.allocation.disk.watermark.flood_stage": "10gb", "cluster.info.update.interval": "1m" } }
     

    转载自:https://www.elastic.co/guide/en/elasticsearch/reference/6.8/disk-allocator.html

  • 相关阅读:
    存储过程
    事务
    mysql常用函数
    explain相关
    索引相关
    sql基本查询语法
    kubernetes日常记录
    Kubernetes的RBAC权限控制
    kubernetes安装ingress-nginx
    Kubernetes部署nginx-ingress
  • 原文地址:https://www.cnblogs.com/fat-girl-spring/p/13721410.html
Copyright © 2011-2022 走看看