# Rerouting shards in cluster

**URL:** <https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547>\
**Category:** Elasticsearch\
**Created:** [June 7, 2017, 9:38am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547 "2017-06-07T09:38:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [June 7, 2017, 9:38am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/1 "2017-06-07T09:38:36Z")

</div>

Hi

In 2.x Es we have used the following rerouting command to move the INITIALIZING shard to STARTED state.

curl -XPOST "[http://172.19.0.16:9200/\_cluster/reroute](http://172.19.0.16:9200/_cluster/reroute)" -d'  
{  
"commands": [{  
"allocate": {  
"index": "fw-dd-2017-06-06",  
"shard": 1,  
"node": "172.19.0.16",  
"allow\_primary": 1  
}  
}]  
}'

I heard ,In ES 5.x they have changed the option to Primary and replica based,  
Can anyone share the sample syntax in 5.x

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 7, 2017, 9:50am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/2 "2017-06-07T09:50:18Z")

</div>

You shouldn't need to do this. What is making you want to run this command?

---

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [June 7, 2017, 9:53am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/3 "2017-06-07T09:53:01Z")

</div>

If in case any hard ware failure s on the particular node, then the shards are like orphan, It's keep on the staus of INTIALIZING for Long days.

---

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [June 7, 2017, 9:54am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/4 "2017-06-07T09:54:25Z")

</div>

fw-dd-2017-06-07 1 p UNASSIGNED  
fw-dd-2017-06-07 0 p STARTED 97 74.6kb 172.19.0.16 172.19.0.16  
utm-mn-2017-06 4 p UNASSIGNED  
utm-mn-2017-06 2 p STARTED 170 139.9kb 172.19.0.16 172.19.0.16  
utm-mn-2017-06 3 p STARTED 150 119.9kb 172.19.0.15 172.19.0.15  
utm-mn-2017-06 1 p UNASSIGNED  
utm-mn-2017-06 5 p STARTED 173 138.5kb 172.19.0.16 172.19.0.16  
utm-mn-2017-06 0 p STARTED 195 165kb 172.19.0.15 172.19.0.15  
fw-dd-2017-06-06 2 p STARTED 376 165.8kb 172.19.0.16 172.19.0.16  
fw-dd-2017-06-06 3 p STARTED 387 185.5kb 172.19.0.15 172.19.0.15  
fw-dd-2017-06-06 1 p UNASSIGNED  
fw-dd-2017-06-06 0 p STARTED 350 160.9kb 172.19.0.15 172.19.0.15  
hids-wk-2017-23 2 p UNASSIGNED

Hard Disk Failures or any other hardware relates issues ,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 7, 2017, 10:11am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/5 "2017-06-07T10:11:06Z")

</div>

Do you not run replicas?

---

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [June 7, 2017, 10:12am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/6 "2017-06-07T10:12:17Z")

</div>

No,We dont have enough resource to run replica's

---

<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:12am UTC](https://discuss.elastic.co/t/rerouting-shards-in-cluster/88547/7 "2017-07-05T10:12:22Z")

</div>

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