# Elasticsearch Cluster Adding node

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637>\
**Category:** Elasticsearch\
**Created:** [September 23, 2020, 10:18am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637 "2020-09-23T10:18:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkhadka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkhadka/32/74848_2.png) [@kkhadka](https://discuss.elastic.co/u/kkhadka)\
**Post date:** [September 23, 2020, 10:18am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637/1 "2020-09-23T10:18:02Z")

</div>

Hi,  
I want to switch from single node elasticsearch to three node cluster without the data loss. For that, I have modified the configuration files correctly.  
Let node1 be the one with data and node2, node3 are new nodes, if I restart the node1 first, then node2 and then node3, the data isn't lost and the cluster is formed successfully.  
But if I restart node2 first then node3 and then node1, then two different clusters are formed, one containing node2 and node3, another node1 acting as single node cluster with only master node.  
i want answers for these:

1. is it mandatory to restart the node with data first?
2. without losing data can I add node1 to the cluster with nodes node2 and node3?
3. is it always mandatory for new node to be empty i.e. data should not be there?

---

<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:** [September 23, 2020, 9:40pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637/2 "2020-09-23T21:40:25Z")

</div>

What version are you running.

---

<div class="post-metadata">

**Author:** ![kkhadka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkhadka/32/74848_2.png) [@kkhadka](https://discuss.elastic.co/u/kkhadka)\
**Post date:** [September 24, 2020, 5:46am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637/3 "2020-09-24T05:46:21Z")

</div>

Hi @warkolm elasticsearch version is `7.4.2`

---

<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:** [September 30, 2020, 5:58am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637/4 "2020-09-30T05:58:08Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html) goes into more detail and links to other parts of the docs that should help here.

You cannot have data on nodes 2 and 3 and then try to add that to the cluster that is node 1. That is essentially trying to merge 2 clusters, which isn't allowed.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 30, 2020, 6:42am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637/5 "2020-09-30T06:42:33Z")

</div>

> [@kkhadka](#):
>
> is it mandatory to restart the node with data first?

New nodes need to be added to an existing cluster so the node currently holding data need to be up first.

> [@kkhadka](#):
>
> without losing data can I add node1 to the cluster with nodes node2 and node3?

No. Node 1 has already formed a cluster and can not join another cluster without losing all data.

> [@kkhadka](#):
>
> is it always mandatory for new node to be empty i.e. data should not be there?

Yes.

---

<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:** [October 28, 2020, 6:42am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-adding-node/249637/6 "2020-10-28T06:42:36Z")

</div>

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