# WARNING: master node with node.data=false deletes cluster

**URL:** https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227
**Category:** Elasticsearch
**Created:** [August 23, 2011, 3:07pm UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227 "2011-08-23T15:07:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Jurgen\_kartnaller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jurgen_kartnaller/32/3086_2.png) [@Jurgen\_kartnaller](https://discuss.elastic.co/u/Jurgen_kartnaller)
#### Post date: [August 23, 2011, 3:07pm UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227/1 "2011-08-23T15:07:50Z")

</div>

If you have node.data set to false it is important to set node.master to  
false.

If a none data node becomes a master the whole cluster data gets lost on a  
restart!

@Shay  
It would be a good idea to automatically set node.master to false if  
node.data is set to true.

Jürgen

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [August 23, 2011, 6:57pm UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227/2 "2011-08-23T18:57:07Z")

</div>

This configuration should is valid and should not result in loss of data. I  
wonder if you hit something I fixed in master/0.17 branch:  
[Single node rolling restart into a new node can cause metadata loss · Issue #1249 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1249).

Can you provide the steps that led to loosing the data? I would like to  
recreate it. For example: Start the non\_data/master node, then start a  
data/non\_master node, index some sample data, shut it down, start it in the  
same order, ... .

On Tue, Aug 23, 2011 at 6:07 PM, Jürgen kartnaller \<  
[juergen.kartnaller@gmail.com](mailto:juergen.kartnaller@gmail.com)\> wrote:

> If you have node.data set to false it is important to set node.master to  
> false.
> 
> If a none data node becomes a master the whole cluster data gets lost on a  
> restart!
> 
> @Shay  
> It would be a good idea to automatically set node.master to false if  
> node.data is set to true.
> 
> Jürgen

---

<div class="post-metadata">

### Author: ![Jurgen\_kartnaller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jurgen_kartnaller/32/3086_2.png) [@Jurgen\_kartnaller](https://discuss.elastic.co/u/Jurgen_kartnaller)
#### Post date: [August 24, 2011, 5:59am UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227/3 "2011-08-24T05:59:29Z")

</div>

We are using version 17.6.

The reason to restart the cluster was an update of a plugin.

Here's the scenario:

- shut down the cluster
- start the none data node (node.data = false, no other node settings)  
At this time this node was marked as master Node in BigDesk
- start the data nodes

-\> data gone

Unfortunately I can not reproduce this scenario ☹

On Tue, Aug 23, 2011 at 8:57 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> This configuration should is valid and should not result in loss of data. I  
> wonder if you hit something I fixed in master/0.17 branch:  
> [Single node rolling restart into a new node can cause metadata loss · Issue #1249 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1249).
> 
> Can you provide the steps that led to loosing the data? I would like to  
> recreate it. For example: Start the non\_data/master node, then start a  
> data/non\_master node, index some sample data, shut it down, start it in the  
> same order, ... .
> 
> On Tue, Aug 23, 2011 at 6:07 PM, Jürgen kartnaller \<  
> [juergen.kartnaller@gmail.com](mailto:juergen.kartnaller@gmail.com)\> wrote:
> 
> > If you have node.data set to false it is important to set node.master to  
> > false.
> > 
> > If a none data node becomes a master the whole cluster data gets lost on a  
> > restart!
> > 
> > @Shay  
> > It would be a good idea to automatically set node.master to false if  
> > node.data is set to true.
> > 
> > Jürgen

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [August 26, 2011, 2:29pm UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227/4 "2011-08-26T14:29:58Z")

</div>

I will try and reproduce it as well. I have several automated tests that do  
just that, and they pass... . If you manage to get it to happen, would love  
to hear it.

On Wed, Aug 24, 2011 at 8:59 AM, Jürgen kartnaller \<  
[juergen.kartnaller@gmail.com](mailto:juergen.kartnaller@gmail.com)\> wrote:

> We are using version 17.6.
> 
> The reason to restart the cluster was an update of a plugin.
> 
> Here's the scenario:
> 
> - shut down the cluster
> - start the none data node (node.data = false, no other node settings)  
> At this time this node was marked as master Node in BigDesk
> - start the data nodes
> 
> -\> data gone
> 
> Unfortunately I can not reproduce this scenario ☹
> 
> On Tue, Aug 23, 2011 at 8:57 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > This configuration should is valid and should not result in loss of data.  
> > I wonder if you hit something I fixed in master/0.17 branch:  
> > [Single node rolling restart into a new node can cause metadata loss · Issue #1249 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1249).
> > 
> > Can you provide the steps that led to loosing the data? I would like to  
> > recreate it. For example: Start the non\_data/master node, then start a  
> > data/non\_master node, index some sample data, shut it down, start it in the  
> > same order, ... .
> > 
> > On Tue, Aug 23, 2011 at 6:07 PM, Jürgen kartnaller \<  
> > [juergen.kartnaller@gmail.com](mailto:juergen.kartnaller@gmail.com)\> wrote:
> > 
> > > If you have node.data set to false it is important to set node.master to  
> > > false.
> > > 
> > > If a none data node becomes a master the whole cluster data gets lost on  
> > > a restart!
> > > 
> > > @Shay  
> > > It would be a good idea to automatically set node.master to false if  
> > > node.data is set to true.
> > > 
> > > Jürgen

---

<div class="post-metadata">

### Author: ![Jurgen\_kartnaller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jurgen_kartnaller/32/3086_2.png) [@Jurgen\_kartnaller](https://discuss.elastic.co/u/Jurgen_kartnaller)
#### Post date: [August 26, 2011, 5:33pm UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227/5 "2011-08-26T17:33:55Z")

</div>

The cluster consist of 12 data nodes and one none data node.

This is what happend before the cluster restart:

We tried to stop the cluster because all nodes where running on a high load  
without a reason.  
First we used the \_shutdown API without success.  
Then we used the shutdown script on all nodes.

On Fri, Aug 26, 2011 at 4:29 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> I will try and reproduce it as well. I have several automated tests that do  
> just that, and they pass... . If you manage to get it to happen, would love  
> to hear it.
> 
> On Wed, Aug 24, 2011 at 8:59 AM, Jürgen kartnaller \<  
> [juergen.kartnaller@gmail.com](mailto:juergen.kartnaller@gmail.com)\> wrote:
> 
> > We are using version 17.6.
> > 
> > The reason to restart the cluster was an update of a plugin.
> > 
> > Here's the scenario:
> > 
> > - shut down the cluster
> > - start the none data node (node.data = false, no other node settings)  
> > At this time this node was marked as master Node in BigDesk
> > - start the data nodes
> > 
> > -\> data gone
> > 
> > Unfortunately I can not reproduce this scenario ☹
> > 
> > On Tue, Aug 23, 2011 at 8:57 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > 
> > > This configuration should is valid and should not result in loss of data.  
> > > I wonder if you hit something I fixed in master/0.17 branch:  
> > > [Single node rolling restart into a new node can cause metadata loss · Issue #1249 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1249).
> > > 
> > > Can you provide the steps that led to loosing the data? I would like to  
> > > recreate it. For example: Start the non\_data/master node, then start a  
> > > data/non\_master node, index some sample data, shut it down, start it in the  
> > > same order, ... .
> > > 
> > > On Tue, Aug 23, 2011 at 6:07 PM, Jürgen kartnaller \<  
> > > [juergen.kartnaller@gmail.com](mailto:juergen.kartnaller@gmail.com)\> wrote:
> > > 
> > > > If you have node.data set to false it is important to set node.master to  
> > > > false.
> > > > 
> > > > If a none data node becomes a master the whole cluster data gets lost on  
> > > > a restart!
> > > > 
> > > > @Shay  
> > > > It would be a good idea to automatically set node.master to false if  
> > > > node.data is set to true.
> > > > 
> > > > Jürgen

---

<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 6, 2017, 3:55am UTC](https://discuss.elastic.co/t/warning-master-node-with-node-data-false-deletes-cluster/5227/6 "2017-07-06T03:55:53Z")

</div>


