Hi,
I want to close node, and want elastic to move his to different node.
What is the procedure for closing node? How it can be done automatically?
Thanks.
Hi,
I want to close node, and want elastic to move his to different node.
What is the procedure for closing node? How it can be done automatically?
Thanks.
If you mean that you want to remove a node from a cluster. All that should need to be done is:
Elasticsearch should automatically handle re-distributing data across the remaining nodes in the cluster.
(The above assumes you're on an actively supported version of Elasticsearch, as this might not be true for older versions)
You need to exclude the node from shard allocation so the shards allocated on this node will move to other nodes.
To do that you need to have enough space in other nodes to store the shards currently on the nodes you want to exclude.
This is the documentation about cluster allocation.
You basically need to run this request and wait for the shards to be moved out from the node:
PUT _cluster/settings
{
"persistent" : {
"cluster.routing.allocation.exclude._ip" : "node-ip-address"
}
}
I am not using replicas.
I am closing the node by pkill -F pid.
After doing it I am getting RED health with unassigned shards. I want to avoid it.
Check my previous answer, you need to remove the node from shard allocation, after the node has no more shards you can shutdown it.
How can I do it?
Please, read the previous answer and check the linked documentation, the answer is there.
Thanks!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.