# Switch Master Nodes (ES 1.5.2)

**URL:** <https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547>\
**Category:** Elasticsearch\
**Created:** [June 12, 2016, 9:03pm UTC](https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547 "2016-06-12T21:03:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pyloor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyloor/32/10271_2.png) [@pyloor](https://discuss.elastic.co/u/pyloor)\
**Post date:** [June 12, 2016, 9:03pm UTC](https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547/1 "2016-06-12T21:03:35Z")

</div>

Hi there,

current setup: two master only nodes with 6 data nodes.  
new setup: three master only nodes with 6 data nodes.  
I use discovery.zen.ping.unicast.hosts and discovery.zen.ping.multicast.enabled: false.  
Besides this: upgrading to a newer version of es is currently not an option.

I want to change the master nodes completely. For me this would mean, shutdown the whole cluster. Change the elasticsearch.yml of the data only nodes (6) to the new three masternodes. Start the master nodes and then start all data nodes. The old master remain shutdown.

Does this work as expected? I cannot find any clear information from the documentation.

I appreciate you help,

Kind regards  
pyloor

---

<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:** [June 12, 2016, 9:45pm UTC](https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547/2 "2016-06-12T21:45:15Z")

</div>

You are better off adding the new master and letting it take control, then removing the old ones and then replacing them.

---

<div class="post-metadata">

**Author:** ![pyloor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyloor/32/10271_2.png) [@pyloor](https://discuss.elastic.co/u/pyloor)\
**Post date:** [June 12, 2016, 9:58pm UTC](https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547/3 "2016-06-12T21:58:24Z")

</div>

How do I add a new master? As far as I understand it, I have to setup a master only node and change the settings of the datanodes (adding the third master to the discovery.zen.ping.unicast.hosts setting. Is this correct?

---

<div class="post-metadata">

**Author:** ![pyloor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pyloor/32/10271_2.png) [@pyloor](https://discuss.elastic.co/u/pyloor)\
**Post date:** [June 12, 2016, 10:15pm UTC](https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547/4 "2016-06-12T22:15:55Z")

</div>

Ok it seems i was a blockhead. I had to add the old master by the discovery.zen.ping.unicast.hosts. Now they are added to the cluster. Thanks for you advice, now I see clear.

---

<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:** [July 5, 2017, 10:44pm UTC](https://discuss.elastic.co/t/switch-master-nodes-es-1-5-2/52547/5 "2017-07-05T22:44:29Z")

</div>


