# Re-create new primary shards after old ones become unavailable

**URL:** <https://discuss.elastic.co/t/re-create-new-primary-shards-after-old-ones-become-unavailable/55611>\
**Category:** Elasticsearch\
**Created:** [July 15, 2016, 11:09am UTC](https://discuss.elastic.co/t/re-create-new-primary-shards-after-old-ones-become-unavailable/55611 "2016-07-15T11:09:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)\
**Post date:** [July 15, 2016, 11:09am UTC](https://discuss.elastic.co/t/re-create-new-primary-shards-after-old-ones-become-unavailable/55611/1 "2016-07-15T11:09:39Z")

</div>

We have an index with 2 primary shards permanently gone. We did not create replicas yet.

How can I create 2 new empty primary shards to replace the removed old ones? I do not want to delete the index and re-index everything, but only re-index the data that we lost.

---

<div class="post-metadata">

**Author:** ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)\
**Post date:** [July 15, 2016, 11:36am UTC](https://discuss.elastic.co/t/re-create-new-primary-shards-after-old-ones-become-unavailable/55611/2 "2016-07-15T11:36:52Z")

</div>

I see that you can reroute. Question answered. 🙂

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 15, 2016, 11:44am UTC](https://discuss.elastic.co/t/re-create-new-primary-shards-after-old-ones-become-unavailable/55611/3 "2016-07-15T11:44:15Z")

</div>

I'm glad you found the solution. For posterity it is the `allow_primary` flag mentioned [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html).

---

<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 5, 2017, 10:35pm UTC](https://discuss.elastic.co/t/re-create-new-primary-shards-after-old-ones-become-unavailable/55611/4 "2017-07-05T22:35:16Z")

</div>


