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

**URL:** <https://forum.opensearch.org/t/there-is-any-problem-when-data-node-master-node/17874>\
**Category:** OpenSearch\
**Created:** [February 13, 2024, 7:19am UTC](https://forum.opensearch.org/t/there-is-any-problem-when-data-node-master-node/17874 "2024-02-13T07:19:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cucukaka](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@cucukaka](https://forum.opensearch.org/u/cucukaka)\
**Post date:** [February 13, 2024, 7:19am UTC](https://forum.opensearch.org/t/there-is-any-problem-when-data-node-master-node/17874/1 "2024-02-13T07:19:14Z")

</div>

**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?**

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [February 29, 2024, 4:06pm UTC](https://forum.opensearch.org/t/there-is-any-problem-when-data-node-master-node/17874/2 "2024-02-29T16:06:37Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![cucukaka](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@cucukaka](https://forum.opensearch.org/u/cucukaka)\
**Post date:** [March 7, 2024, 5:03am UTC](https://forum.opensearch.org/t/there-is-any-problem-when-data-node-master-node/17874/3 "2024-03-07T05:03:15Z")

</div>

@pablo Thanks for apply  
So, I solved this problem

ref) Cluster settings - OpenSearch Documentation]([Cluster settings - OpenSearch Documentation](https://opensearch.org/docs/latest/install-and-configure/configuring-opensearch/cluster-settings/))

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

```auto
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](https://opensearch.org/docs/latest/install-and-configure/upgrade-opensearch/rolling-upgrade/) )
