DBAtlas · データベース運用アトラス

ディスクのウォーターマークを管理し、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
}

概要

ノードごとのディスク使用量と有効なウォーターマークの値を表示する。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 を超えると、そのノードにシャードを持つインデックスは読み取り専用になる。しきい値の引き上げは時間稼ぎにすぎない。恒久的な対策は、古いインデックスの削除、レプリカの削減、ディスク / ノードの追加である。ディスクが完全に満杯になると、シャードが破損する可能性がある。

DBAtlas で開く →

関連項目