# Reroute unassigned shards

**URL:** <https://discuss.elastic.co/t/reroute-unassigned-shards/120686>\
**Category:** Elasticsearch\
**Created:** [February 20, 2018, 4:50pm UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686 "2018-02-20T16:50:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ocebeci](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@ocebeci](https://discuss.elastic.co/u/ocebeci)\
**Post date:** [February 20, 2018, 4:50pm UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686/1 "2018-02-20T16:50:33Z")

</div>

How can I reroute all unassigned shards to single-node with ES version 5.6?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 21, 2018, 11:13am UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686/4 "2018-02-21T11:13:22Z")

</div>

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

Elasticsearch will never assign a primary shard and its replica to the same node, so if you only have one node you will never be able to allocate any configured replica shards. Ways to remove the unassigned shard would be to add another node to the cluster or set the number of replicas to 0 for all indices.

If you have unassigned primary shards, have a look at [this blog post](https://www.elastic.co/blog/red-elasticsearch-cluster-panic-no-longer).

---

<div class="post-metadata">

**Author:** ![ocebeci](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@ocebeci](https://discuss.elastic.co/u/ocebeci)\
**Post date:** [February 26, 2018, 4:10pm UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686/5 "2018-02-26T16:10:27Z")

</div>

Thank you. I really should be patient, sorry for this.

I have a couple of unassigned primary shards and want to allocate them to the single node. The blog post concerning unassigned primary shards doesn't match my allocation problem. When I'm using the explain API I recieve this:

```
|index|"sap-pi-alert-2017.10.15"|
|---|---|
|shard|0|
|primary|true|
|current_state|"unassigned"|
|unassigned_info||
|reason|"CLUSTER_RECOVERED"|
|at|"2018-02-26T10:36:08.476Z"|
|last_allocation_status|"no_valid_shard_copy"|
|can_allocate|"no_valid_shard_copy"|
|allocate_explanation|"cannot allocate because all found copies of the shard are either stale or corrupt"|
|node_allocation_decisions||
|0||
|node_id|"W_yIkoU1RRuG8XM3wyJ1wQ"|
|node_name|"ELASASP101"|
|transport_address|"<my_elasticsearch>"|
|node_decision|"no"|
|store||
|in_sync|true|
|allocation_id|"4zEE_6I5QPyvnvf4n76K_Q"|
|store_exception||
|type|"corrupt_index_exception"|
|reason|"Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path=\"D:\\elasticsearch\\nodes\\0\\indices\\gdk2e42DSZCJ_7oEwAuz5g\\0\\index\\segments_j\"))): 8 (needs to be between 4 and 6) (resource=preexisting_corruption)"|
|caused_by||
|type|"index_format_too_new_exception"|
|reason|"Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path=\"D:\\elasticsearch\\nodes\\0\\indices\\gdk2e42DSZCJ_7oEwAuz5g\\0\\index\\segments_j\"))): 8 (needs to be between 4 and 6)"|

```

I really don't know how to resolve that.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 27, 2018, 4:59pm UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686/6 "2018-02-27T16:59:36Z")

</div>

If they are corrupted you may not be able to restore them. This is one of the reason running a single node is not recommended. Do you have any backup you can restore from?

---

<div class="post-metadata">

**Author:** ![ocebeci](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@ocebeci](https://discuss.elastic.co/u/ocebeci)\
**Post date:** [February 28, 2018, 8:22am UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686/7 "2018-02-28T08:22:08Z")

</div>

I worked with elastic stack on linux before. The current one is on windows and not configured by me. So there is only one node and it is pretty difficult for me to join another node to the cluster on the same machine. That's why there is a single node cluster.

I made a snapshot two weeks ago but what will happen to the newer data if I am going to restore the old snapshot? How can I merge them?

---

<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:** [March 28, 2018, 8:22am UTC](https://discuss.elastic.co/t/reroute-unassigned-shards/120686/8 "2018-03-28T08:22:26Z")

</div>

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