# Question About Allocation of Primary and Replica Shards After Reboot

**URL:** <https://discuss.elastic.co/t/question-about-allocation-of-primary-and-replica-shards-after-reboot/22075>\
**Category:** Elasticsearch\
**Created:** [February 10, 2015, 10:09pm UTC](https://discuss.elastic.co/t/question-about-allocation-of-primary-and-replica-shards-after-reboot/22075 "2015-02-10T22:09:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Harris](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Josh\_Harris](https://discuss.elastic.co/u/Josh_Harris)\
**Post date:** [February 10, 2015, 10:09pm UTC](https://discuss.elastic.co/t/question-about-allocation-of-primary-and-replica-shards-after-reboot/22075/1 "2015-02-10T22:09:17Z")

</div>

We recently restarted the six nodes in our ES cluster to perform the patch  
for the Ghost vulnerability. We turned off reallocation, shut down the  
individual nodes, then rebooted each node and turned reallocation back on.

We have 12 shards per index and one replica index. After the reboot of all  
the nodes, we ended up with some nodes with three primary shards and one  
replica index and some with three replicas and one primary shard.

Is there a way to prevent this mismatch in the distribution of our primary  
and replica shards? Would like to have 2 primary shards and 2 replica shard  
per node.

Also, is there a way to change a shard from a replica to a primary shard  
without doing a relocation?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/37aa4937-9202-4f6b-9c27-6ef50873d555%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/37aa4937-9202-4f6b-9c27-6ef50873d555%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:33am UTC](https://discuss.elastic.co/t/question-about-allocation-of-primary-and-replica-shards-after-reboot/22075/2 "2017-07-06T00:33:49Z")

</div>


