How to move data?
How to move data?
Hey guys,
Our /usr directory is becoming very large. We are looking to move only the data from elasticsearch over and keeping all of the configuration files in place.
What is the best way to do this? Which folders will I have to move over? Which configuration files will I need to modify? Which services do I need to stop before doing this?
I was thinking of copying all the data from /usr/local/nagioslogserver/elasticsearch/data to /data1/data, then just making a soft link from /usr/local/nagioslogserver/elasticsearch/data to /data1/data. Would that work? Is that all I have to do?
Our /usr directory is becoming very large. We are looking to move only the data from elasticsearch over and keeping all of the configuration files in place.
What is the best way to do this? Which folders will I have to move over? Which configuration files will I need to modify? Which services do I need to stop before doing this?
I was thinking of copying all the data from /usr/local/nagioslogserver/elasticsearch/data to /data1/data, then just making a soft link from /usr/local/nagioslogserver/elasticsearch/data to /data1/data. Would that work? Is that all I have to do?
Re: How to move data?
I tested the above in a lab, and it worked like a charm. Full procedure:was thinking of copying all the data from /usr/local/nagioslogserver/elasticsearch/data to /data1/data, then just making a soft link from /usr/local/nagioslogserver/elasticsearch/data to /data1/data. Would that work? Is that all I have to do?
Code: Select all
service elasticsearch stop
cd /usr/local/nagioslogserver/elasticsearch
mkdir /data1 ; chown nagios.nagios /data1/
mv data/ /data1/
ln -s /data/data/ data
service elasticsearch startLet us know if you have any problems, thanks!
Re: How to move data?
It looks like it worked, until I log in. Then clicking around I have an error and it looks like most of my logs aren't there:
You do not have the required permissions to view the files attached to this post.
Re: How to move data?
I have only updated one of the nodes so far, should I do the other now?
Re: How to move data?
Give the other one a try as well - and be sure that the 'nagios' user is allowed to write to your new directory properly.
Re: How to move data?
Okay I did the other one as well. Still Doesn't seem to be helping...
Both servers have the nagios:nagios for the owner and group....
Last one:
New server:
It looks like calcium is getting logs from barium, but that's the only server:
Both servers have the nagios:nagios for the owner and group....
Last one:
Code: Select all
[owen@barium data1]$ ls -al
total 4
drwxr-xr-x 3 nagios nagios 17 Jan 20 13:55 .
dr-xr-xr-x. 19 root root 4096 Jan 20 09:55 ..
drwxr-xr-x. 4 nagios nagios 92 Nov 23 15:04 dataCode: Select all
[owen@calcium data1]$ ls -al
total 4
drwxr-xr-x. 3 nagios nagios 17 Jan 20 15:39 .
dr-xr-xr-x. 19 root root 4096 Jan 20 09:40 ..
drwxr-xr-x. 4 nagios nagios 92 Nov 23 15:06 dataIt looks like calcium is getting logs from barium, but that's the only server:
You do not have the required permissions to view the files attached to this post.
Re: How to move data?
Oh yes,
I am getting this FacetPhaseExecutionException message every once in while on the dashboard:
I am getting this FacetPhaseExecutionException message every once in while on the dashboard:
You do not have the required permissions to view the files attached to this post.
Re: How to move data?
Is your cluster status green?
If not, it's possible that you need to give the cluster some time to distribute data appropriately.
Alternatively, you could try changing the DATA_DIR directive in /etc/sysconfig/elasticsearch:
DATA_DIR="/data1/data"
Give elasticsearch a restart after that and let me know if it helps - this directive will not be overwritten on upgrade.
Jesse
Code: Select all
curl 'localhost:9200/_cluster/health?level=indices&pretty'Alternatively, you could try changing the DATA_DIR directive in /etc/sysconfig/elasticsearch:
DATA_DIR="/data1/data"
Give elasticsearch a restart after that and let me know if it helps - this directive will not be overwritten on upgrade.
Jesse
Re: How to move data?
I got it working!
My global settings were messed up for some reason and didn't have my cluster hostname in there.
Both ways work for me now, the link and the DATA_DIR.
Thanks for your help!
My global settings were messed up for some reason and didn't have my cluster hostname in there.
Both ways work for me now, the link and the DATA_DIR.
Thanks for your help!
Re: How to move data?
Thanks for that update and glad to hear it is working -- we'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!