We are facing some issues with shard allocation (both primary and replica) after upgrading the ES cluster size. We had a three node elasticsearch cluster and we recently added two more nodes into this cluster.
The two new nodes are only data nodes (node.master: false, node.data: true).
The problem right now we're facing is, the newly created indexes are only allocated to the two new nodes (ES4 & ES5 - in our case). And the replica shards / primary shards are not getting created / allocated to old nodes (ES1, ES2 and ES3).
- Is this an expected behaviour? if so, how we can split the shards across all nodes and the replica shard?
- We are planning to upgrade the node size to 10 or more. So how we can distribute the shard allocation across all nodes?
Someone please share if any documents available.
This is an example of shards allocated after adding two nodes to our ES cluster.
[Settings 5 shards, 1 replica]