ローカルのDocker for Mac で3ノードのクラスタ構成のES環境をつくり、そこにsnapshotをrestoreしていたときにエラーが発生した
{"type": "server", "timestamp": "2022-08-30T02:26:46,548Z", "level": "WARN", "component" : "o.e.c.r.a.DiskThresholdMonitor", "cluster.name": "docker-cluster", "node.name": "elasticsearch", "message": "flood stage disk watermark [95%] exceeded on [xxxxxxxx][elasticsearch3][/usr/share/elasticsearch/data/nodes/0] free: 3.6gb[4.9%], all indices on this node will be marked read-only", "cluster.uuid": "xxxxxxxx", "node.id": "xxxxxxxx" }
書かれているようにdiskサイズがギリギリになっている模様
ディスクサイズを増やすか、不要なインデックスを削除したい後は残されたインデックスがread-onlyになって書き込みができなくなっているので
以下のコマンドで解除してあげる
curl --location --request PUT 'http://localhost:9200/_all/_settings' \ --header 'Content-Type: application/json' \ --data-raw '{ "index.blocks.read_only_allow_delete": null }'