# Adding master nodes to Existing cluster

**URL:** <https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880>\
**Category:** Elasticsearch\
**Created:** [January 13, 2020, 5:14pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880 "2020-01-13T17:14:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![surya2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/surya2/32/43120_2.png) [@surya2](https://discuss.elastic.co/u/surya2)\
**Post date:** [January 13, 2020, 5:14pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/1 "2020-01-13T17:14:47Z")

</div>

Hello All,

I have 14 node elasticsearch cluster in which all nodes are data,master,client. Now i want to have separate master nodes. How do i achieve this without causing splitbrain or down time. I can bring one node at one time down. Suggestions please.

Thanks,  
Surya.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 13, 2020, 5:49pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/2 "2020-01-13T17:49:16Z")

</div>

The reference manual includes [comprehensive instructions on adding and removing master-eligible nodes](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-adding-removing-nodes.html#modules-discovery-adding-removing-nodes) and for [repurposing existing nodes](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#change-node-role). You should add your new dedicated master nodes and then repurpose your existing nodes one-by-one.

---

<div class="post-metadata">

**Author:** ![surya2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/surya2/32/43120_2.png) [@surya2](https://discuss.elastic.co/u/surya2)\
**Post date:** [January 13, 2020, 6:29pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/3 "2020-01-13T18:29:36Z")

</div>

Thank you so much. I would like to do  
step 1: Add 3 master only nodes to the cluster  
step 2: update each node other than master only node to be data only node(one node at one time).

Does this look good? @DavidTurner

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 13, 2020, 6:44pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/4 "2020-01-13T18:44:27Z")

</div>

Yes, sounds good to me.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [January 13, 2020, 6:48pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/5 "2020-01-13T18:48:13Z")

</div>

> [@surya2](#):
>
> master nodes. Ho

I did same, on small level. I had five node cluster all data-master  
I wanted one node as master only as it has low disk space and was using for something else as well.  
this is what I did.

I ran following

```
PUT /_cluster/settings
{
   "transient" :{
   "cluster.routing.allocation.exclude._ip" : "<ip_of_nodewho is getting out>"
     }
}

```

if above does not work you can use name

```
PUT /_cluster/settings
{
   "transient" :{
   "cluster.routing.allocation.exclude._name" : "<name of node is getting out>"
     }
}

```

then once is is empty of all data. shut it down.  
change elasticsearch.yml file and have this.  
node.master: true  
node.data: false

restarted node and now it is master only.

once all is done  
I did this  
PUT /\_cluster/settings  
{  
"transient" :{  
"cluster.routing.allocation.exclude.\_name" : ""  
}  
}

that makes routing enable.

---

<div class="post-metadata">

**Author:** ![surya2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/surya2/32/43120_2.png) [@surya2](https://discuss.elastic.co/u/surya2)\
**Post date:** [January 13, 2020, 6:55pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/6 "2020-01-13T18:55:16Z")

</div>

Thanks @elasticforme .  
I do not want to make existing nodes to be master. I will take them down and make data only node.  
I am going to add additional 3 master only nodes.

---

<div class="post-metadata">

**Author:** ![surya2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/surya2/32/43120_2.png) [@surya2](https://discuss.elastic.co/u/surya2)\
**Post date:** [January 13, 2020, 6:55pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/7 "2020-01-13T18:55:30Z")

</div>

thanks @DavidTurner

---

<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:** [February 10, 2020, 6:55pm UTC](https://discuss.elastic.co/t/adding-master-nodes-to-existing-cluster/214880/8 "2020-02-10T18:55:37Z")

</div>

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