DBAtlas · 데이터베이스 운영 아틀라스

디스크 watermark 관리 및 flood-stage 쓰기 차단 해제

Elasticsearch클러스터/노드

명령어

GET _cat/allocation?v&h=node,shards,disk.indices,disk.used,disk.avail,disk.percent&s=disk.percent:desc
GET _cluster/settings?include_defaults=true&filter_path=*.cluster.routing.allocation.disk
# Adjust thresholds temporarily (null returns to the default):
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.disk.watermark.low": "85%",
    "cluster.routing.allocation.disk.watermark.high": "90%",
    "cluster.routing.allocation.disk.watermark.flood_stage": "95%"
  }
}
# After freeing space, remove the flood-stage write block:
PUT _all/_settings
{
  "index.blocks.read_only_allow_delete": null
}

하는 일

노드별 디스크 사용량과 실제 적용되는 watermark 값을 보여 준다. low/high/flood_stage 임계값을 조정하고 flood stage에서 인덱스에 걸린 read_only_allow_delete 차단을 해제한다.

사용 시점

쓰기가 'TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block'으로 거부될 때, 새 샤드가 할당되지 않을 때, 또는 가득 찬 노드에서 샤드가 빠져나가기 시작할 때.

주의

low를 넘으면 노드에 새 샤드가 할당되지 않고, high를 넘으면 샤드가 노드에서 옮겨지며, flood_stage를 넘으면 그 노드에 샤드가 있는 인덱스가 읽기 전용이 된다. 임계값을 올리는 것은 시간을 벌 뿐이며, 지속적인 해결책은 오래된 인덱스 삭제, replica 축소, 디스크/노드 추가다. 디스크가 완전히 차면 샤드가 손상될 수 있다.

DBAtlas에서 열기 →

관련 항목