数据移动到cold节点 + 禁止写入 + 副本降为:0
PUT index_old/_settings
{
"index.number_of_replicas": "0",
"index.routing.allocation.require.box_type": "cold",
"index.blocks.write": true
}
生成新索引:分片降为1
POST /index_old/_shrink/index_new
{
"settings": {
"index.number_of_replicas": 0,
"index.number_of_shards": 1,
"index.codec": "best_compression",
"index.routing.allocation.require.box_type": "cold"
}
}
查看数据分布
GET _cat/shards/index_*