0

我正在运行一个两节点集群 Elasticsearch,1 个主节点 + 1 个节点。一切运行顺利,所有索引都是绿色的,正常运行(尽管现在没有副本)。

我当前的弹性搜索配置是:

path.data = /path/to/data

但是我想添加一个额外的路径(LVM 卷)来扩展 Elasticsearch 的磁盘大小。我确实关闭了 ES 数据节点,然后我更改了 elasticsearch.yml conf 文件,如下所示:

path.data = ["/path/to/data", "/path/to/newdata"]

我重新启动了数据节点。集群立即变红,所有分片都未分配。我还检查了全局禁用分配设置,它是:

routing.allocation.disable_allocation: false

我再次关闭了节点,删除了第二条路径,重新启动了集群,一切又变绿了。请注意,ElasticSearch 正确检测到新的数据路径,实际上磁盘空间增加了。

如何向 ES 数据节点添加第二条路径以增加磁盘空间并让 ElasticSearch 正确识别它?

非常感谢您的帮助!

**** 添加 ****

弹性搜索构建 1.7.3

_nodes/stats(之前)

     "fs": {
        "timestamp": 1445875849977,
        "total": {
           "total_in_bytes": 50647003136,
           "free_in_bytes": 39121285120,
           "available_in_bytes": 36850778112,
           "disk_reads": 6555,
           "disk_writes": 3959,
           "disk_io_op": 10514,
           "disk_read_size_in_bytes": 117785600,
           "disk_write_size_in_bytes": 34197504,
           "disk_io_size_in_bytes": 151983104,
           "disk_queue": "0",
           "disk_service_time": "0"
        },
        "data": [
           {
              "path": "/data/cluster-name/nodes/0",
              "mount": "/",
              "dev": "/dev/sda1",
              "type": "ext4",
              "total_in_bytes": 50647003136,
              "free_in_bytes": 39121285120,
              "available_in_bytes": 36850778112,
              "disk_reads": 6555,
              "disk_writes": 3959,
              "disk_io_op": 10514,
              "disk_read_size_in_bytes": 117785600,
              "disk_write_size_in_bytes": 34197504,
              "disk_io_size_in_bytes": 151983104,
              "disk_queue": "0",
              "disk_service_time": "0"
           }
        ]
     },

_nodes/stats(之后)

"fs": {
        "timestamp": 1445876141872,
        "total": {
           "total_in_bytes": 940360904704,
           "free_in_bytes": 649207984128,
           "available_in_bytes": 626626637824,
           "disk_reads": 8840,
           "disk_writes": 246,
           "disk_io_op": 9086,
           "disk_read_size_in_bytes": 127649792,
           "disk_write_size_in_bytes": 13971456,
           "disk_io_size_in_bytes": 141621248,
           "disk_queue": "0",
           "disk_service_time": "0"
        },
        "data": [
           {
              "path": "/data/cluster-name/nodes/0",
              "mount": "/",
              "dev": "/dev/vda1",
              "type": "ext4",
              "total_in_bytes": 422616936448,
              "free_in_bytes": 131537268736,
              "available_in_bytes": 114234032128,
              "disk_reads": 8524,
              "disk_writes": 232,
              "disk_io_op": 8756,
              "disk_read_size_in_bytes": 126358528,
              "disk_write_size_in_bytes": 13914112,
              "disk_io_size_in_bytes": 140272640,
              "disk_queue": "0",
              "disk_service_time": "0"
           },
           {
              "path": "/data-new/cluster-name/nodes/0",
              "mount": "/data-new",
              "dev": "/dev/mapper/vg0-lvol0",
              "type": "ext4",
              "total_in_bytes": 517743968256,
              "free_in_bytes": 517670715392,
              "available_in_bytes": 512392605696,
              "disk_reads": 316,
              "disk_writes": 14,
              "disk_io_op": 330,
              "disk_read_size_in_bytes": 1291264,
              "disk_write_size_in_bytes": 57344,
              "disk_io_size_in_bytes": 1348608
           }
        ]
     },
4

1 回答 1

0

这是因为当您向 Elasticsearch 添加数据路径时,您并没有告诉它像它希望的那样使用所有数据路径,而是告诉它将数据条带化到所有这些路径。所以不要把它想象成一个可以使用的新池,而是作为 Raid-0。

如果您有一个具有 1 个或更多复制的集群,并且关闭了一个节点以添加新路径,则集群将丢弃该节点的所有数据并重新创建条带化到两条路径的所有数据。

于 2016-02-22T09:59:52.940 回答