我在不同的机器上有3个节点,分别是node-1,node-2和node-3:
这是磁盘详细信息:
curl -XGET "http://localhost:9200/_nodes?pretty&filter_path=nodes.*.settings.path.data"
{
"nodes" : {
"hUsbol66SMqDeyqIlU7FQw" : {
"settings" : {
"path" : {
"data" : [
"/deploy/esdata/lib/elasticsearch",
"/deploy2/esdata/lib/elasticsearch",
"/deploy3/esdata/lib/elasticsearch",
"/deploy4/esdata/lib/elasticsearch"
]
}
}
},
"MQforPOqRMuJ6tZCZXoTSw" : {
"settings" : {
"path" : {
"data" : [
"/deploy0/esdata/lib/elasticsearch",
"/deploy/esdata/lib/elasticsearch",
"/deploy3/esdata/lib/elasticsearch",
"/deploy4/esdata/lib/elasticsearch"
]
}
}
},
"niUUe251QVSuKguQQZt8kQ" : {
"settings" : {
"path" : {
"data" : [
"/disk2/esdata/lib/elasticsearch",
"/disk3/esdata/lib/elasticsearch",
"/disk4/esdata/lib/elasticsearch"
]
}
}
}
}
}
这是磁盘使用详细信息:
node-1
/dev/vdc1 985G 865G 70G 93% /disk2
/dev/vdd1 985G 153G 783G 17% /disk3
/dev/vde1 985G 1.8G 933G 1% /disk4
node-2
/dev/vdb1 985G 926G 8.3G 100% /deploy
/dev/vdc1 985G 324G 612G 35% /deploy2
/dev/vdd1 985G 284M 934G 1% /deploy3
/dev/vde1 985G 271M 934G 1% /deploy4
node-3
/dev/vdb1 985G 251G 684G 27% /deploy0
/dev/vdc1 985G 252G 683G 27% /deploy
/dev/vdd1 985G 148G 787G 16% /deploy3
/dev/vde1 985G 127G 808G 14% /deploy4
问题是,为什么节点2无法将数据平衡到其他磁盘?
一开始,每个节点只有一个磁盘,当它们占60%时,我增加了更多,但是为什么节点2仍然使用2个disk2,而另一个磁盘的数据却少得多。