# Why am I seeing a "FORBIDDEN/12/index read-only / allow delete" response against my index?

**URL:** https://discuss.elastic.co/t/why-am-i-seeing-a-forbidden-12-index-read-only-allow-delete-response-against-my-index/244344
**Category:** Elastic Tips and Common Fixes
**Tags:** elasticsearch
**Created:** [August 10, 2020, 6:25am UTC](https://discuss.elastic.co/t/why-am-i-seeing-a-forbidden-12-index-read-only-allow-delete-response-against-my-index/244344 "2020-08-10T06:25:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)
#### Post date: [August 10, 2020, 6:25am UTC](https://discuss.elastic.co/t/why-am-i-seeing-a-forbidden-12-index-read-only-allow-delete-response-against-my-index/244344/1 "2020-08-10T06:25:16Z")

</div>

You will usually see this error when your node(s) reach their [flood stage disk level](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html#disk-based-shard-allocation).

When Elasticsearch detects a node's disk is nearing being full, it sets any index that the node holds to a read only state to protect the data that it has in these indices. Because a read only state cannot be applied on a shard level, you may receive this error from a node that is not nearing it's watermark level, so make sure you check your other nodes.

The default flood stage watermark level, which is 95% of the total size of the disk Elasticsearch has identified as its `path.data`, can be [altered dynamically](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html#disk-based-shard-allocation). You may want to manually to set this if you have larger disks, as 95% of 4TB is approx 110GB, or increase it temporarily to allow you to delete the index and free up space:

```auto
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.disk.watermark.low": "90%",
    "cluster.routing.allocation.disk.watermark.low.max_headroom": "100GB",
    "cluster.routing.allocation.disk.watermark.high": "95%",
    "cluster.routing.allocation.disk.watermark.high.max_headroom": "20GB",
    "cluster.routing.allocation.disk.watermark.flood_stage": "97%",
    "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": "5GB",
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen": "97%",
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": "5GB"
  }
}

PUT */_settings?expand_wildcards=all
{
  "index.blocks.read_only_allow_delete": null
}

```

The steps to troubleshoot the allocations as given in the [Fix watermark errors documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/fix-watermark-errors.html).

Once the disk space issue has been resolved, you can set the cluster or back to a writeable state using these call;

```auto
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.disk.watermark.low": null,
    "cluster.routing.allocation.disk.watermark.low.max_headroom": null,
    "cluster.routing.allocation.disk.watermark.high": null,
    "cluster.routing.allocation.disk.watermark.high.max_headroom": null,
    "cluster.routing.allocation.disk.watermark.flood_stage": null,
    "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": null,
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen": null,
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": null
  }
}

PUT /INDEXNAME/_settings
{
  "index.blocks.read_only_allow_delete": null
}

```

**NOTE** - Elasticsearch will treat the `null` value above as a request to remove the `index.blocks.read_only_allow_delete` value against the index, thereby making it writable.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 4, 2022, 8:09am UTC](https://discuss.elastic.co/t/why-am-i-seeing-a-forbidden-12-index-read-only-allow-delete-response-against-my-index/244344/2 "2022-11-04T08:09:25Z")

</div>


