# Unassigned shards/indexes

**URL:** https://discuss.elastic.co/t/unassigned-shards-indexes/305159
**Category:** Elasticsearch
**Created:** [May 19, 2022, 9:52am UTC](https://discuss.elastic.co/t/unassigned-shards-indexes/305159 "2022-05-19T09:52:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jan\_Engelbrecht](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_engelbrecht/32/99821_2.png) [@Jan\_Engelbrecht](https://discuss.elastic.co/u/Jan_Engelbrecht)
#### Post date: [May 19, 2022, 9:52am UTC](https://discuss.elastic.co/t/unassigned-shards-indexes/305159/1 "2022-05-19T09:52:03Z")

</div>

Hi,  
I'm quite new to Elastic, we're running 7.15.1 (Centos 7)on our production servers.  
We have 3 nodes currently and the following happened when I added a 4th one.  
After the 4th Node joined the cluster replication started and all looked good, but it got stuck on 97.5%, status stayed Yellow, eventually (after about 15min) I checked the logs and didn't see any errors.  
I stopped node4 with the hope of just re-adding it would solve this replication stuck on 95%  
After I stopped it, cluster health went to red.

...  
curl [http://10.0.3.16:9200/\_cat/shards?h=index,shard,prirep,state,unassigned.reason|](http://10.0.3.16:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason%7C) grep UNASSIGNED  
`% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 7790 100 7790 0 0 511k 0 --:--:-- --:--:-- --:--:-- 543k  
.ds-.logs-deprecation.Elasticsearch-default-2022.05.19-000001 0 p UNASSIGNED INDEX\_REOPENED  
.ds-.logs-deprecation.Elasticsearch-default-2022.05.19-000001 0 r UNASSIGNED REPLICA\_ADDED  
.ds-ilm-history-5-2022.05.19-000001 0 p UNASSIGNED INDEX\_REOPENED  
.ds-ilm-history-5-2022.05.19-000001 0 r UNASSIGNED INDEX\_REOPENED  
...

This is the shards that is not assigned, I tried closing and opening them and also tried removing and adding a replica (from what I read on the net that some people tried) and nothing works.  
how can I go about to resolve this? The 2 indexes seems to be Elastic indexes.  
How important are they?  
Can I just delete them?  
Is there a way to repair them?

Thanks very much  
Jan

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [May 19, 2022, 12:37pm UTC](https://discuss.elastic.co/t/unassigned-shards-indexes/305159/2 "2022-05-19T12:37:31Z")

</div>

IMO removing them should not cause any harm.

---

<div class="post-metadata">

### Author: ![Jan\_Engelbrecht](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_engelbrecht/32/99821_2.png) [@Jan\_Engelbrecht](https://discuss.elastic.co/u/Jan_Engelbrecht)
#### Post date: [May 20, 2022, 5:55am UTC](https://discuss.elastic.co/t/unassigned-shards-indexes/305159/3 "2022-05-20T05:55:17Z")

</div>

Hi,  
Thanks for the reply, that is what I also thought, but when I try to remove it I get the following:

...  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "illegal\_argument\_exception",  
"reason" : "index [.ds-.logs-deprecation.Elasticsearch-default-2022.05.19-000001] is the write index for data stream [.logs-deprecation.Elasticsearch-default] and cannot be deleted"  
}  
],  
"type" : "illegal\_argument\_exception",  
"reason" : "index [.ds-.logs-deprecation.Elasticsearch-default-2022.05.19-000001] is the write index for data stream [.logs-deprecation.Elasticsearch-default] and cannot be deleted"  
},  
"status" : 400  
}  
...

---

<div class="post-metadata">

### Author: ![Jan\_Engelbrecht](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_engelbrecht/32/99821_2.png) [@Jan\_Engelbrecht](https://discuss.elastic.co/u/Jan_Engelbrecht)
#### Post date: [May 20, 2022, 6:55am UTC](https://discuss.elastic.co/t/unassigned-shards-indexes/305159/4 "2022-05-20T06:55:43Z")

</div>

I think i found the solution, for incase anyone else has this issue.  
You need to roll\_over too a new index.

...  
curl -X POST "[http://10.0.3.16:9200/.logs-deprecation.elasticsearch-default/\_rollover/?pretty](http://10.0.3.16:9200/.logs-deprecation.elasticsearch-default/_rollover/?pretty)"  
curl -X POST "[http://10.0.3.16:9200/ilm-history-5/\_rollover/?pretty](http://10.0.3.16:9200/ilm-history-5/_rollover/?pretty)"  
...

After this you can delete the old ones.

Thanks

---

<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: [June 17, 2022, 6:56am UTC](https://discuss.elastic.co/t/unassigned-shards-indexes/305159/5 "2022-06-17T06:56:18Z")

</div>

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