HI all
i saw many topics around here but non to conclude it in the end.
I managed to move my Elasticsearch stuff away from the main disk.
SO:
I created a new HDD, mounted it under /mnt/data/
the original Elasticsearch data is in:
var/lib/elasticsearch
var/log/elasticsearch
first, i copied all the contents into the new location - i did not used move, for safety reasons
cp /var/lib/elasticsearch /mnt/data/elasticsearch/lib/
cp /var/log/elasticsearch /mnt/data/elasticsearch/log/
then i renamed the folders
mv /var/lib/elasticsearch /var/lib/elasticsearch2
mv /var/log/elasticsearch /var/log/elasticsearch2
then you delete the elasticsearch folders
rm -R mv /var/lib/elasticsearch
rm -R mv /var/log/elasticsearch
then you create the links
ln -s /var/lib/elasticsearch /mnt/data/elasticsearch/lib/
ln -s /var/l0g/elasticsearch /mnt/data/elasticsearch/log/
then you give permissions
chmod 777 /mnt/data/elasticsearch/lib/
chmod 777 /mnt/data/elasticsearch/log/
REBOOT SERVER - if you only restart the service, you’ll get errors
worked like a charm.
After this you can delete the elasticsearch2 folders early created as safety under LIB and LOG in VAR folder.
you owe me a beer.