# Unassign shard

**URL:** <https://discuss.elastic.co/t/unassign-shard/205156>\
**Category:** Elasticsearch\
**Created:** [October 24, 2019, 9:11pm UTC](https://discuss.elastic.co/t/unassign-shard/205156 "2019-10-24T21:11:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 24, 2019, 9:11pm UTC](https://discuss.elastic.co/t/unassign-shard/205156/1 "2019-10-24T21:11:43Z")

</div>

I know this has been ask many time. but can't find answer or fix my problem

I had two node test cluster.  
I just abruptly shutdown/remove one node.

all the shards are there but some are saying unassigned and r

rally-metrics-2019-09 0 p STARTED 16707 2.3mb 10.28.233.2 elktst01  
rally-metrics-2019-09 0 r UNASSIGNED

rally-races-2019-09 0 p STARTED 6 101.1kb 10.28.233.2 elktst01  
rally-races-2019-09 0 r UNASSIGNED

so look like these second is secondary shard but because system is gone they are unassigned.  
I don't care if it gets deleted or reassign to same server  
how do I make them green again?

cluster status is yellow. everything works as accepted due to distributed nature.

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [October 25, 2019, 1:36am UTC](https://discuss.elastic.co/t/unassign-shard/205156/2 "2019-10-25T01:36:03Z")

</div>

The `r` means `replica`. If you [reconfigure your indices to have zero replicas](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings), those unassigned replicas will go away. What I have sometimes done instead is configure indices for auto-expansion so that when a node is added I will still get replica shards.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 25, 2019, 1:11pm UTC](https://discuss.elastic.co/t/unassign-shard/205156/3 "2019-10-25T13:11:19Z")

</div>

I am not going to add node to this mix anymore so did following and all working and green

PUT /\*/\_settings  
{  
"index" : {  
"number\_of\_replicas":0,  
"auto\_expand\_replicas": false  
}  
}

---

<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 22, 2019, 1:19pm UTC](https://discuss.elastic.co/t/unassign-shard/205156/4 "2019-11-22T13:19:31Z")

</div>

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