如何增加ElasticSearch的磁盘空间

mgdq6dx1  于 2023-02-07  发布在  ElasticSearch
关注(0)|答案(1)|浏览(348)

我刚刚使用了下面的命令来检查节点中的可用磁盘空间。
输入:(开发控制台)

GET /_cat/nodes?v&h=id,diskTotal,diskUsed,diskAvail,diskUsedPercent

输出:

id   diskTotal diskUsed diskAvail diskUsedPercent
   vcgA     9.6gb    8.6gb   960.4mb           90.26

我有一个节点,它显示960. 4MB的可用空间。是否有可能增加到2GB?谁能告诉我如何实现这一点?
此外,我只是想知道,我没有任何索引创建在集群,但不知道它是如何占用8.6gb的空间。
我还在elasticsearch.yml文件中添加了以下配置属性

cluster.routing.allocation.disk.threshold_enabled: true
    cluster.routing.allocation.disk.watermark.flood_stage: 20gb
    cluster.routing.allocation.disk.watermark.low: 30gb
    cluster.routing.allocation.disk.watermark.high: 25gb

ElasticSearch日志:

sudo docker logs c8eadd9d92f6

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-12-08T18:16:10,968][INFO ][o.e.e.NodeEnvironment    ] [EWlGsNg] using [1] data paths, mounts [[/ (overlay)]], net usable_space [959.1mb], net total_space [9.6gb], types [overlay]
[2019-12-08T18:16:10,972][INFO ][o.e.e.NodeEnvironment    ] [EWlGsNg] heap size [9.8gb], compressed ordinary object pointers [true]
[2019-12-08T18:16:10,975][INFO ][o.e.n.Node               ] [EWlGsNg] node name derived from node ID [EWlGsNg9R4ChiOSACmSE5Q]; set [node.name] to override
[2019-12-08T18:16:10,975][INFO ][o.e.n.Node               ] [EWlGsNg] version[6.6.0], pid[1], build[oss/tar/a9861f4/2019-01-24T11:27:09.439740Z], OS[Linux/4.15.0-1044-gcp/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.1/11.0.1+13]
[2019-12-08T18:16:10,975][INFO ][o.e.n.Node               ] [EWlGsNg] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-14249827840908502393, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.cgroups.hierarchy.override=/, -Xmx10g, -Xms10g, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=oss, -Des.distribution.type=tar]
[2019-12-08T18:16:11,844][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [aggs-matrix-stats]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [analysis-common]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [ingest-common]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [lang-expression]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [lang-mustache]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [lang-painless]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [mapper-extras]
[2019-12-08T18:16:11,845][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [parent-join]
[2019-12-08T18:16:11,846][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [percolator]
[2019-12-08T18:16:11,846][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [rank-eval]
[2019-12-08T18:16:11,846][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [reindex]
[2019-12-08T18:16:11,846][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [repository-url]
[2019-12-08T18:16:11,846][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [transport-netty4]
[2019-12-08T18:16:11,846][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded module [tribe]
[2019-12-08T18:16:11,847][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded plugin [ingest-geoip]
[2019-12-08T18:16:11,847][INFO ][o.e.p.PluginsService     ] [EWlGsNg] loaded plugin [ingest-user-agent]
[2019-12-08T18:16:15,363][INFO ][o.e.d.DiscoveryModule    ] [EWlGsNg] using discovery type [single-node] and host providers [settings]
[2019-12-08T18:16:15,919][INFO ][o.e.n.Node               ] [EWlGsNg] initialized
[2019-12-08T18:16:15,919][INFO ][o.e.n.Node               ] [EWlGsNg] starting ...
[2019-12-08T18:16:16,619][INFO ][o.e.t.TransportService   ] [EWlGsNg] publish_address {192.20.9.2:9300}, bound_addresses {0.0.0.0:9300}
[2019-12-08T18:16:16,747][INFO ][o.e.h.n.Netty4HttpServerTransport] [EWlGsNg] publish_address {192.20.9.2:9200}, bound_addresses {0.0.0.0:9200}
[2019-12-08T18:16:16,747][INFO ][o.e.n.Node               ] [EWlGsNg] started
[2019-12-08T18:16:16,781][INFO ][o.e.g.GatewayService     ] [EWlGsNg] recovered [0] indices into cluster_state
[2019-12-08T18:16:16,931][INFO ][o.e.m.j.JvmGcMonitorService] [EWlGsNg] [gc][1] overhead, spent [447ms] collecting in the last [1s]
[2019-12-08T18:16:17,184][INFO ][o.e.c.m.MetaDataCreateIndexService] [EWlGsNg] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [doc]
[2019-12-08T18:16:17,195][INFO ][o.e.c.r.a.AllocationService] [EWlGsNg] updating number_of_replicas to [0] for indices [.kibana_1]
[2019-12-08T18:16:17,468][INFO ][o.e.c.r.a.AllocationService] [EWlGsNg] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]] ...]).

注意:我使用的是ELK 6.6.0版本
有没有人能帮我一下。我卡住了,不知道怎么才能做到这一点?

9rygscc1

9rygscc11#

如果您通过Docker运行ElasticSearch,您可以通过Docker Desktop -〉Settings-〉Resources-〉Virtual disk limit增加总磁盘空间。
如果这是无法实现的,我建议您阅读官方的ElasticSearch文档上的Increase the disk capacity of data nodes的进一步信息。

相关问题