Rerouting shards in cluster

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" -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

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

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.

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 ,

Do you not run replicas?

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

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