# Elasticsearch - Change nodes to data only

**URL:** <https://discuss.elastic.co/t/elasticsearch-change-nodes-to-data-only/285007>\
**Category:** Elasticsearch\
**Created:** [September 23, 2021, 1:37pm UTC](https://discuss.elastic.co/t/elasticsearch-change-nodes-to-data-only/285007 "2021-09-23T13:37:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![voom](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@voom](https://discuss.elastic.co/u/voom)\
**Post date:** [September 23, 2021, 1:37pm UTC](https://discuss.elastic.co/t/elasticsearch-change-nodes-to-data-only/285007/1 "2021-09-23T13:37:14Z")

</div>

Hi All,

I have an 8 node cluster which is made up of the following roles:

- 3 master-only nodes
- 5 master + data nodes

I am planning on having the 5 master + data nodes converted to data only and was planning on following this procedure to do it:

1. Use **POST /\_cluster/voting\_config\_exclusions?node\_names=node\_name** and exclude all the **master + data** nodes from the voting configuration
2. On the designated data nodes update Elasticsearch.yml to remove **master** role from the **node.roles** parameter.
3. On the designated data nodes update Elasticsearch.yml to set **discovery.seed\_hosts** to only have the IP addresses of the **master-only** nodes
4. Restart the data nodes one by one.

Would the steps outlined above be the correct way of handling this situation? Or is there any better way that this could be accomplished. My goal is to have this done with no downtime on the cluster.

Thank you

---

<div class="post-metadata">

**Author:** ![voom](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@voom](https://discuss.elastic.co/u/voom)\
**Post date:** [October 4, 2021, 11:02am UTC](https://discuss.elastic.co/t/elasticsearch-change-nodes-to-data-only/285007/2 "2021-10-04T11:02:25Z")

</div>

In case someone encounters the same scenario as myself, if the steps I've outlined in my original steps are followed this will work. I have managed to this with version 7.12.1 and didn't encounter any issues.

Once I've added a node to the voting exclusion I checked that the exclusion was applied with:

**GET /\_cluster/state?filter\_path=metadata.cluster\_coordination.voting\_config\_exclusions**

Apart from that the Node ID should also not show up in here if has been excluded:

**GET /\_cluster/state?filter\_path=metadata.cluster\_coordination.last\_committed\_config**

---

<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:** [November 1, 2021, 11:02am UTC](https://discuss.elastic.co/t/elasticsearch-change-nodes-to-data-only/285007/3 "2021-11-01T11:02:26Z")

</div>

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