Elasticsearch Cluster Adding node

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?

What version are you running.

Hi @warkolm elasticsearch version is 7.4.2

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.

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

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


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