我正在运行一个两节点集群 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
}
]
},