# How do i fix Unassigned Replicas on cluster?

**URL:** <https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699>\
**Category:** Elasticsearch\
**Created:** [December 1, 2021, 5:37pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699 "2021-12-01T17:37:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shreesh\_Narayanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreesh_narayanan/32/87312_2.png) [@Shreesh\_Narayanan](https://discuss.elastic.co/u/Shreesh_Narayanan)\
**Post date:** [December 1, 2021, 5:37pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/1 "2021-12-01T17:37:20Z")

</div>

Hello,

we recently created a cluster on 2 VMs , 1 with Elasticsearch as MASTER node and another with Elasticsearch as DATA node . How do i allocate the replicas ? it seems the primary is allocated but the replicas arent.

We had a single node set up till last week and today we tried our hand with the cluster setup

```auto
 curl 172.26.207.168:9200/_cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
172.26.207.168 29 99 90 32.40 24.52 17.36 d - Nexus_elasticsearch_dev02
172.26.207.164 57 92 2 0.40 0.25 0.14 m * Nexus_elasticsearch_dev01

```

```auto
req_lines 0 p STARTED 4436417 827.3mb 172.26.207.168 Nexus_elasticsearch_dev02
req_lines 0 r UNASSIGNED                                
c_lines 0 p STARTED 1621071 248.8mb 172.26.207.168 Nexus_elasticsearch_dev02
c_lines 0 r UNASSIGNED                                
gmon_lines 0 p STARTED 57000 22.8mb 172.26.207.168 Nexus_elasticsearch_dev02
gmon_lines 0 r UNASSIGNED                                
dnsp_lines 0 p STARTED 6902280 345.1mb 172.26.207.168 Nexus_elasticsearch_dev02
dnsp_lines 0 r UNASSIGNED                                
f_lines 0 p STARTED 922366 203.4mb 172.26.207.168 Nexus_elasticsearch_dev02
f_lines 0 r UNASSIGNED                                
.kibana_task_manager_7.15.0_001 0 p STARTED 15 1.4mb 172.26.207.168 Nexus_elasticsearch_dev02
.apm-custom-link 0 p UNASSIGNED                                
.kibana_7.15.0_001 0 p STARTED 132 4.8mb 172.26.207.168 Nexus_elasticsearch_dev02
.apm-agent-configuration 0 p UNASSIGNED                                
.kibana-event-log-7.15.0-000001 0 p STARTED 1 6kb 172.26.207.168 Nexus_elasticsearch_dev02
.ds-ilm-history-5-2021.12.01-000001 0 p UNASSIGNED
```

---

<div class="post-metadata">

**Author:** ![Shreesh\_Narayanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreesh_narayanan/32/87312_2.png) [@Shreesh\_Narayanan](https://discuss.elastic.co/u/Shreesh_Narayanan)\
**Post date:** [December 1, 2021, 5:39pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/2 "2021-12-01T17:39:55Z")

</div>

and the output of GET /\_cluster/health , incase if it helps to fix this

```auto
{
  "cluster_name" : "ELK-nexus",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 8,
  "active_shards" : 8,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 8,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
}
```

---

<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:** [December 1, 2021, 6:02pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/3 "2021-12-01T18:02:05Z")

</div>

You can not as the dedicated master node can not hold data. If you change it into a master/data node the replicas should get assigned assuming you have enough space.

---

<div class="post-metadata">

**Author:** ![Shreesh\_Narayanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreesh_narayanan/32/87312_2.png) [@Shreesh\_Narayanan](https://discuss.elastic.co/u/Shreesh_Narayanan)\
**Post date:** [December 1, 2021, 6:06pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/4 "2021-12-01T18:06:30Z")

</div>

thanks for the response @Christian_Dahlqvist . Could you tell me if having a master node is a requirement in a cluster set up ?

you said "If you change it into a master/data node the replicas should get assigned assuming you have enough space." - can a node have multiple roles i.e to be both a master and data node ?

---

<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:** [December 1, 2021, 6:11pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/5 "2021-12-01T18:11:55Z")

</div>

For small clusters having dedicated master nodes is usually not required. If you are startring out I would start with 1 or 3 nodes that have all roles.

---

<div class="post-metadata">

**Author:** ![Shreesh\_Narayanan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreesh_narayanan/32/87312_2.png) [@Shreesh\_Narayanan](https://discuss.elastic.co/u/Shreesh_Narayanan)\
**Post date:** [December 1, 2021, 6:12pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/6 "2021-12-01T18:12:45Z")

</div>

yup, we are just starting out 🙂 thanks a lot for your answers .

---

<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:** [December 29, 2021, 6:13pm UTC](https://discuss.elastic.co/t/how-do-i-fix-unassigned-replicas-on-cluster/290699/7 "2021-12-29T18:13:41Z")

</div>

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