【发布时间】:2020-11-09 10:21:49
【问题描述】:
我在 kubernetes 集群(v1.18 - kind)上运行 Elasicsearch (floragunncom/sg-elasticsearch:7.0.1-oss-35.0.0)。
我已经为每个 Elasticsearch 数据节点(即 Pod)分配了 PVC 的 200Mi 作为存储。但是当 elasticseach 集群(3 master, 3 data, 2 ingest)启动时,它会显示以下警告消息:
{"type": "server", "timestamp": "2020-07-20T06:27:14,354+0000", "level": "WARN", "component": "oecraDiskThresholdMonitor", "cluster.名称”:“拓扑-es”,“node.name”:“master-topology-es-1”,“cluster.uuid”:“U0Yf6tiJSHC57R_QHa2qiw”,“node.id”:“tDet2llLQaydoxfYT4TcpQ”,“消息”:“在 [C-TUE5_cR1ihqrhThpWnsg][data-topology-es-1][/usr/share/elasticsearch/data/nodes/0] 上超过高磁盘水印 [90%] 免费:5.5gb [7%],分片将被重新定位远离这个节点”}
-
5.5gb[7%]来自哪里?
我还检查了分片的状态:
$ curl -XGET "https://localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason" -u "admin:XXXXX" --insecure
searchguard 0 p STARTED
searchguard 0 r UNASSIGNED REPLICA_ADDED
searchguard 0 r UNASSIGNED REPLICA_ADDED
- 如果
200Mi还不够,那么data-node-0中怎么分配主shard成功,而data-node-1和data-node-2中没有replica呢?
更新:
$ curl -XGET "https://localhost:9200/_nodes/stats/fs?pretty" -u "admin:XXXX" --insecure
{
"_nodes" : {
"total" : 8,
"successful" : 8,
"failed" : 0
},
"cluster_name" : "topology-es",
"nodes" : {
"jYkduRCmQ2GEHMn2DeBrxg" : {
"timestamp" : 1595231421976,
"name" : "data-topology-es-0",
"transport_address" : "10.244.0.59:9300",
"host" : "10.244.0.59",
"ip" : "10.244.0.59:9300",
"roles" : [
"data"
],
"fs" : {
"timestamp" : 1595231421989,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 77306,
"read_operations" : 7745,
"write_operations" : 69561,
"read_kilobytes" : 230532,
"write_kilobytes" : 500284
}
],
"total" : {
"operations" : 77306,
"read_operations" : 7745,
"write_operations" : 69561,
"read_kilobytes" : 230532,
"write_kilobytes" : 500284
}
}
}
},
"N7ql_AneQoa6w8yvgBhYZg" : {
"timestamp" : 1595231421977,
"name" : "client-topology-es-0",
"transport_address" : "10.244.0.49:9300",
"host" : "10.244.0.49",
"ip" : "10.244.0.49:9300",
"roles" : [
"ingest"
],
"fs" : {
"timestamp" : 1595231421981,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 84052,
"read_operations" : 7853,
"write_operations" : 76199,
"read_kilobytes" : 231804,
"write_kilobytes" : 565340
}
],
"total" : {
"operations" : 84052,
"read_operations" : 7853,
"write_operations" : 76199,
"read_kilobytes" : 231804,
"write_kilobytes" : 565340
}
}
}
},
"gse01W_XR7qKvZPHPq7n7g" : {
"timestamp" : 1595231421984,
"name" : "master-topology-es-2",
"transport_address" : "10.244.0.57:9300",
"host" : "10.244.0.57",
"ip" : "10.244.0.57:9300",
"roles" : [
"master"
],
"fs" : {
"timestamp" : 1595231421993,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 77627,
"read_operations" : 7747,
"write_operations" : 69880,
"read_kilobytes" : 230560,
"write_kilobytes" : 504608
}
],
"total" : {
"operations" : 77627,
"read_operations" : 7747,
"write_operations" : 69880,
"read_kilobytes" : 230560,
"write_kilobytes" : 504608
}
}
}
},
"bBNEuz2pSkWeOUmDIowEDQ" : {
"timestamp" : 1595231421991,
"name" : "client-topology-es-1",
"transport_address" : "10.244.0.51:9300",
"host" : "10.244.0.51",
"ip" : "10.244.0.51:9300",
"roles" : [
"ingest"
],
"fs" : {
"timestamp" : 1595231421995,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 82173,
"read_operations" : 7788,
"write_operations" : 74385,
"read_kilobytes" : 231144,
"write_kilobytes" : 546544
}
],
"total" : {
"operations" : 82173,
"read_operations" : 7788,
"write_operations" : 74385,
"read_kilobytes" : 231144,
"write_kilobytes" : 546544
}
}
}
},
"-hwsv3rqQeSVdfOsKqzrwA" : {
"timestamp" : 1595231422013,
"name" : "master-topology-es-0",
"transport_address" : "10.244.0.53:9300",
"host" : "10.244.0.53",
"ip" : "10.244.0.53:9300",
"roles" : [
"master"
],
"fs" : {
"timestamp" : 1595231422080,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 79542,
"read_operations" : 7762,
"write_operations" : 71780,
"read_kilobytes" : 230792,
"write_kilobytes" : 521656
}
],
"total" : {
"operations" : 79542,
"read_operations" : 7762,
"write_operations" : 71780,
"read_kilobytes" : 230792,
"write_kilobytes" : 521656
}
}
}
},
"C-TUE5_cR1ihqrhThpWnsg" : {
"timestamp" : 1595231421984,
"name" : "data-topology-es-1",
"transport_address" : "10.244.0.61:9300",
"host" : "10.244.0.61",
"ip" : "10.244.0.61:9300",
"roles" : [
"data"
],
"fs" : {
"timestamp" : 1595231422003,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 77169,
"read_operations" : 7736,
"write_operations" : 69433,
"read_kilobytes" : 230396,
"write_kilobytes" : 498544
}
],
"total" : {
"operations" : 77169,
"read_operations" : 7736,
"write_operations" : 69433,
"read_kilobytes" : 230396,
"write_kilobytes" : 498544
}
}
}
},
"zlL7F5kRTLWWogzffZXomA" : {
"timestamp" : 1595231422000,
"name" : "data-topology-es-2",
"transport_address" : "10.244.0.63:9300",
"host" : "10.244.0.63",
"ip" : "10.244.0.63:9300",
"roles" : [
"data"
],
"fs" : {
"timestamp" : 1595231422001,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 77048,
"read_operations" : 7736,
"write_operations" : 69312,
"read_kilobytes" : 230396,
"write_kilobytes" : 496864
}
],
"total" : {
"operations" : 77048,
"read_operations" : 7736,
"write_operations" : 69312,
"read_kilobytes" : 230396,
"write_kilobytes" : 496864
}
}
}
},
"tDet2llLQaydoxfYT4TcpQ" : {
"timestamp" : 1595231421993,
"name" : "master-topology-es-1",
"transport_address" : "10.244.0.55:9300",
"host" : "10.244.0.55",
"ip" : "10.244.0.55:9300",
"roles" : [
"master"
],
"fs" : {
"timestamp" : 1595231422020,
"total" : {
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
},
"data" : [
{
"path" : "/usr/share/elasticsearch/data/nodes/0",
"mount" : "/usr/share/elasticsearch/data (/dev/sda3)",
"type" : "ext4",
"total_in_bytes" : 84054204416,
"free_in_bytes" : 10231291904,
"available_in_bytes" : 5917450240
}
],
"io_stats" : {
"devices" : [
{
"device_name" : "sda3",
"operations" : 77766,
"read_operations" : 7748,
"write_operations" : 70018,
"read_kilobytes" : 230576,
"write_kilobytes" : 505892
}
],
"total" : {
"operations" : 77766,
"read_operations" : 7748,
"write_operations" : 70018,
"read_kilobytes" : 230576,
"write_kilobytes" : 505892
}
}
}
}
}
}
【问题讨论】:
-
运行这个
GET _nodes/stats/fs会得到什么? -
@Val,更新了我的问题。请看一看。
-
@KamolHasan 很长时间以来,您都没有接受并赞成我的回答,如果您的问题得到解决,如果您能接受并赞成答案,那就太好了
-
@opsterelasticsearchninja,非常感谢您的回答。这很有帮助。因此我投了赞成票。但这并没有解决我的问题。我在另一个答案中添加了原因。
-
@KamolHasan 哦,好的,谢谢,很高兴我有帮助
标签: elasticsearch kubernetes search-guard