# All indices reside in "unassigned shards"

**URL:** <https://discuss.elastic.co/t/all-indices-reside-in-unassigned-shards/198836>\
**Category:** Elasticsearch\
**Created:** [September 10, 2019, 7:26am UTC](https://discuss.elastic.co/t/all-indices-reside-in-unassigned-shards/198836 "2019-09-10T07:26:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Franco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franco/32/52614_2.png) [@Franco](https://discuss.elastic.co/u/Franco)\
**Post date:** [September 10, 2019, 7:26am UTC](https://discuss.elastic.co/t/all-indices-reside-in-unassigned-shards/198836/1 "2019-09-10T07:26:02Z")

</div>

Hi,

I'm a newbie to ELK and did an out-of-the-box setup with ELK 7.2.0 some weeks ago.  
After getting familiar with grok patterns I succeeded to ship my different log sources into ES.  
While the amount of data grows and I now investigate in backup/snapshots etc., I yesterday (docker) setup "lmenezes/cerebro" utility.

The overview screen shocked me:

![grafik](https://us1.discourse-cdn.com/elastic/original/3X/7/6/76942f3dd1cf81ee4935e04ef55f4065e08e0fdc.png)

Most of my indices have state "unassigned shards".

What must I do to get my installation clear?

Best regards  
Franco

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [September 10, 2019, 8:02am UTC](https://discuss.elastic.co/t/all-indices-reside-in-unassigned-shards/198836/2 "2019-09-10T08:02:49Z")

</div>

Your cluster health seems to be `yellow` indicating that every primary shard is assigned, so the only unassigned shards are replicas. You only have one node, so this is to be expected: all the primaries are assigned on your one node, and Elasticsearch will not assign two copies of the same shard to a single node, so all the replicas are necessarily unassigned.

You can either add a second node to your cluster or else [set the number of replicas to `0`](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html) on all your current indices to remove the unassigned (and unassignable) replicas:

```auto
PUT /_all/_settings
{
    "index": {
        "number_of_replicas": 0
    }
}

```

---

<div class="post-metadata">

**Author:** ![Franco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franco/32/52614_2.png) [@Franco](https://discuss.elastic.co/u/Franco)\
**Post date:** [September 10, 2019, 8:08am UTC](https://discuss.elastic.co/t/all-indices-reside-in-unassigned-shards/198836/3 "2019-09-10T08:08:41Z")

</div>

Tnx for your explanation, David.

I fired the PUT

> curl -XPUT -H "Content-Type: application/json" localhost:9200/\_all/\_settings -d '{ "index": { "number\_of\_replicas": 0 } }'

and got that result:

```curl
{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [.tasks] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}],"type":"cluster_block_exception","reason":"index [.tasks] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"},"status":403}

```

Ok, found it:  
There was a remnant in [.tasks] when my local storage runs out space.  
After

> curl -XPUT -H "Content-Type: application/json" localhost:9200/.tasks/\_settings -d '{"index.blocks.read\_only\_allow\_delete": null}'

I succeeded with setting number\_of\_replicas to zero.

Tnx you very much, David.

---

<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:** [October 8, 2019, 8:08am UTC](https://discuss.elastic.co/t/all-indices-reside-in-unassigned-shards/198836/4 "2019-10-08T08:08:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
