# Move shards from one host to another

**URL:** <https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945>\
**Category:** Elasticsearch\
**Created:** [February 8, 2018, 12:04am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945 "2018-02-08T00:04:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhalde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fhalde/32/21419_2.png) [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Post date:** [February 8, 2018, 12:04am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945/1 "2018-02-08T00:04:20Z")

</div>

Hello Elastic

We have a cluster of 30 machines and each index has 1 replica. So we can tolerate 1 VM taken down. But we have to repair 2 VMs now. We have a day ahead of us. Is there a way to move all shards from the 2 VMs to the rest of the cluster? Any command?

---

<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:** [February 8, 2018, 1:03am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945/2 "2018-02-08T01:03:17Z")

</div>

I think [https://www.elastic.co/guide/en/elasticsearch/reference/6.2/allocation-filtering.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/allocation-filtering.html) could be what you are looking for.

---

<div class="post-metadata">

**Author:** ![fhalde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fhalde/32/21419_2.png) [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Post date:** [February 8, 2018, 2:36am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945/3 "2018-02-08T02:36:16Z")

</div>

if i exclude two machines? will the cluster go red?

i.e. { "transient" : { "cluster.routing.allocation.exclude.\_ip" : "ip1,ip2" } }

---

<div class="post-metadata">

**Author:** ![fhalde](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fhalde/32/21419_2.png) [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Post date:** [February 8, 2018, 2:36am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945/4 "2018-02-08T02:36:25Z")

</div>

@warkolm

---

<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:** [February 8, 2018, 2:37am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945/5 "2018-02-08T02:37:32Z")

</div>

It'll start to move shards off those two nodes, but it shouldn't go red.

---

<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 8, 2018, 2:38am UTC](https://discuss.elastic.co/t/move-shards-from-one-host-to-another/118945/6 "2018-03-08T02:38:05Z")

</div>

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