Maintenance of Elastic Search Nodes
Posted: Wed Aug 26, 2015 8:34 pm
Hello,
I want to remove NLS nodes out of the cluster, in order to perform maintenance (disk expansion)
I have Step-by-step guide for ElasticSearch rolling restart, and whether it would apply to NLS
Check cluster setting: curl -u XXX:XXX -XGET "http://localhost:9200/_cluster/settings?pretty=true"
Disable shard allocation:
curl -u XXX:XXX -XPUT "http://localhost:9200/_cluster/settings" -d'
{
"transient" : {
"cluster.routing.allocation.enable" : "none"
}
}'
shutdown the node
curl -u xxx:xxx-XPOST "http://localhost:9200/_cluster/nodes/_local/_shutdown"
Wait for the connection clear out.
netstat -on | grep 9200|wc
netstat -on | grep 9300|wc
upgrade/server maintenance or .....
restart elasticsearch: service elasticsearch start
Enable shard allocation:
curl -u xxx:xxx -XPUT "http://localhost:9200/_cluster/settings" -d'
{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}'
Wait for cluster status to green. Repeat step 1 to 6 for all other nodes.
* The speed of shard reallocation is related to following:
cluster.routing.allocation.cluster_concurrent_rebalance default is 2
indices.recovery.max_bytes_per_sec defaults to 40mb
I want to remove NLS nodes out of the cluster, in order to perform maintenance (disk expansion)
I have Step-by-step guide for ElasticSearch rolling restart, and whether it would apply to NLS
Check cluster setting: curl -u XXX:XXX -XGET "http://localhost:9200/_cluster/settings?pretty=true"
Disable shard allocation:
curl -u XXX:XXX -XPUT "http://localhost:9200/_cluster/settings" -d'
{
"transient" : {
"cluster.routing.allocation.enable" : "none"
}
}'
shutdown the node
curl -u xxx:xxx-XPOST "http://localhost:9200/_cluster/nodes/_local/_shutdown"
Wait for the connection clear out.
netstat -on | grep 9200|wc
netstat -on | grep 9300|wc
upgrade/server maintenance or .....
restart elasticsearch: service elasticsearch start
Enable shard allocation:
curl -u xxx:xxx -XPUT "http://localhost:9200/_cluster/settings" -d'
{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}'
Wait for cluster status to green. Repeat step 1 to 6 for all other nodes.
* The speed of shard reallocation is related to following:
cluster.routing.allocation.cluster_concurrent_rebalance default is 2
indices.recovery.max_bytes_per_sec defaults to 40mb