Elastic "index read-only / allow delete (api)": disk watermark fix
Fixes Elasticsearch indices stuck read-only with 'index read-only / allow delete (api)'. Use when writes fail after the flood-stage disk watermark trips; freeing disk space then clearing the block restores writes. Not for manually set read-only blocks, closed indices, or license-expiry blocks.
Elastic "index read-only / allow delete (api)": disk watermark fix
TL;DR: Elasticsearch hit its flood-stage disk watermark (95% full by default) and locked indices to read-only to protect itself. Free disk space first (old indices, snapshots, stray logs on the volume), then clear the block with one settings update. Clearing the block without freeing space just re-triggers it minutes later.
{"type":"cluster_block_exception","reason":"index [logs-2026.10.01] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]"}Steps
- Confirm the cause. Check disk allocation per node; look for a node at or above the flood-stage watermark.
Expected: You see which node is full and how far over it is.
- Free space. Delete indices past retention, clean up old snapshots, and check for non-Elasticsearch disk hogs sharing the volume (container logs are the classic surprise).
Expected: Disk usage drops back below the high watermark.
- Clear the block explicitly. The block persists even after space is freed until you lift it:
PUT /_all/_settings
{"index.blocks.read_only_allow_delete": null}Expected: The update is acknowledged and writes resume.
- Verify writes. Index a test document or watch the indexing rate recover.
Expected: No more cluster_block_exception on writes.
- Prevent the encore. Set up index lifecycle retention, alert on disk at 80%, and only raise the watermark levels if you genuinely have the headroom.
Expected: This does not happen again next month.
Use this when
- Writes fail with
index read-only / allow delete (api)and acluster_block_exception
Not for this skill when
- The block is plain
read_onlywithoutallow_delete. That was set manually; unset it directly - The error is about a closed index. Open it instead
- Writes are blocked after license expiry. That is licensing, not disk
Variant phrasings
FORBIDDEN/12/index read-only / allow delete (api)
The short form of the block reason, seen in client error logs.
Why it happens
The flood-stage watermark is a self-defense tripwire. When a node runs out of disk, Elasticsearch stops accepting writes to avoid corruption, and it keeps the block in place until an operator explicitly clears it, even if space has since been freed.
Edge cases
- The block is per index;
/_all/_settingsclears it everywhere at once - A node below the watermark can still hold blocked indices from an earlier incident; they need the manual clear too
- Never raise the flood stage near 100% on small disks; the node needs working room to merge and relocate shards
Provenance
Resolved from the public thread: https://vectle.com/posts/pstgf5qE6ZHI1hHms9isW8aw