# How to reassign the blocks

**URL:** <https://discuss.elastic.co/t/how-to-reassign-the-blocks/129078>\
**Category:** Elasticsearch\
**Created:** [April 23, 2018, 10:28am UTC](https://discuss.elastic.co/t/how-to-reassign-the-blocks/129078 "2018-04-23T10:28:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anil\_kumar\_Samantula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anil_kumar_samantula/32/49351_2.png) [@anil\_kumar\_Samantula](https://discuss.elastic.co/u/anil_kumar_Samantula)\
**Post date:** [April 23, 2018, 10:28am UTC](https://discuss.elastic.co/t/how-to-reassign-the-blocks/129078/1 "2018-04-23T10:28:35Z")

</div>

Hi ,

Recently we created 3 nodes in a cluster because of some reason we want to remove those nodes and bring our elasticsearch to old state (without nodes).

how to do this by not loosing any data?

Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [April 23, 2018, 1:51pm UTC](https://discuss.elastic.co/t/how-to-reassign-the-blocks/129078/2 "2018-04-23T13:51:24Z")

</div>

The easiest thing to do is take down one node, wait for the cluster to re-balance the shards across the existing nodes, take down the next node, etc.

Edit: ^^^^ this assumes you have at least one replica for each index. If you don't have replicas, you'll have to use shard filtering below vvv

Alternatively, you could use [Shard Allocation Filtering](https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-allocation-filtering.html) to exclude all your indices from the target nodes, wait for the cluster to rebalance, then take down the nodes.

Make sure you update [`minimum_master_nodes` as appropriate](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-discovery-zen.html#master-election)

---

<div class="post-metadata">

**Author:** ![anil\_kumar\_Samantula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anil_kumar_samantula/32/49351_2.png) [@anil\_kumar\_Samantula](https://discuss.elastic.co/u/anil_kumar_Samantula)\
**Post date:** [April 29, 2018, 6:26am UTC](https://discuss.elastic.co/t/how-to-reassign-the-blocks/129078/3 "2018-04-29T06:26:54Z")

</div>

Thanks for reply ..re-balancing of nodes is best thing

---

<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:** [May 27, 2018, 6:27am UTC](https://discuss.elastic.co/t/how-to-reassign-the-blocks/129078/4 "2018-05-27T06:27:00Z")

</div>

Closed on May 27, 2018, 6:27am UTC

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