将机器中一个节点的弹性搜索索引移动到同一台机器的另一个驱动器 [英] Moving an elasticsearch index of one node in a machine to another drive of the same machine

查看:97
本文介绍了将机器中一个节点的弹性搜索索引移动到同一台机器的另一个驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在机器上有一个弹性搜索节点,具有150gb ssd和3 tb hdd。由于我在ssd空间不足,我想将一个索引从ssd移动到hdd。这可能吗?如果是这样呢?



我可以在hdd上创建另一个节点,但我宁愿在机器中有一个节点...



谢谢!

解决方案

您可以安全地移动数据目录(和各个索引,甚至分片) 。我们已经以这种方式对整个索引进行了整理。



尽管如此,您可能不应该主动索引或删除,或者不可预测的事情可能发生。 / p>

一旦你做了移动,你只需要弹性搜索找到数据目录。您设置在弹性搜索配置文件中找到/ etc / elasticsearch



只需添加此设置:

 路径:
logs:/ path / to / log / files
data:/ path / to / data / directory
/ pre>

您可能想要cp而不是mv,以防万一不按规划进行。


I have an elasticsearch node in a machine with a 150gb ssd and a 3 tb hdd. Since I am running out of space in the ssd, I would like to move one index from the ssd to the hdd. Is this possible? If so how?

I could create another node on the hdd, but I'd rather have one node in the machine...

Thanks!

解决方案

You can safely move the data directory (and individual indexes and even shards) around. We've scp'd entire indexes around in this manner.

You probably should not actively index or delete when you are doing this though, or unpredictable things could happen.

Once you do the move, you just need to tell elasticsearch where to find data directory. You set this in the elasticsearch config file found in /etc/elasticsearch

Just add this setting:

path:
  logs: /path/to/log/files
  data: /path/to/data/directory

You might want to cp and not mv, just in case things don't go as planed.

这篇关于将机器中一个节点的弹性搜索索引移动到同一台机器的另一个驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆