ES 升级

禁用分片分配。

curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}
'

停止索引并执行同步刷新

curl -XPOST 'localhost:9200/_flush/synced?pretty'

关闭所有节点。  
升级所有节点。  
升级所有插件。  
启动每个升级的节点。  
等待所有节点加入群集并报告黄色状态  

curl -XGET 'localhost:9200/_cat/health?pretty'
curl -XGET 'localhost:9200/_cat/nodes?pretty'

重新分配。

curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'
{
"persistent": {
"cluster.routing.allocation.enable": "all"
}
}
'

 

curl -XGET 'localhost:9200/_cat/health?pretty'
curl -XGET 'localhost:9200/_cat/recovery?pretty'

posted @ 2018-01-23 10:30  猪朵朵  阅读(345)  评论(0编辑  收藏  举报