Move a shard manually (reroute)
ElasticsearchCluster/NodeCommand
POST /_cluster/reroute
{
"commands": [
{
"move": {
"index": "customer",
"shard": 0,
"from_node": "node-1",
"to_node": "node-2"
}
}
]
}What it does
Manually moves a specific shard from one node to another.
When to use it
To fix an unbalanced shard distribution or to drain a specific node.
Caution
It can conflict with automatic rebalancing; moving large shards creates network and IO load.