There is any problem when data node -> master node?

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch 2.11

Describe the issue:
I have 7 nodes in a opensearch cluster

  1. only master
  2. master & data node
  3. master & data node
  4. data node
  5. data node
  6. data node
  7. data node

I want to change master&data node(2, 3) → master node
If I change from master & data node to master only node, does the index stored at the that nodes keep maintained? Or does it all disappear? Is there no problem if I change it?

@cucukaka When you set the role to master and you’ll still have indices in that node, then OpenSearch may report it as an Error and won’t start.
You need to first migrate the data indices to other nodes.

@pablo Thanks for apply
So, I solved this problem

ref) Cluster settings - OpenSearch Documentation](Cluster settings - OpenSearch Documentation)

first, Shards in data node moved out other data node using cluster.routing.allocation.exclude._ip
for example

PUT _cluster/settings
{
  "transient" :{
    "cluster.routing.allocation.exclude._ip": "ip that I want to change the role from data to master"
  }
}

after that, you should rolling update step( Rolling Upgrade - OpenSearch Documentation )

1 Like