moving the data folder for ES
moving the data folder for ES
I followed the instructions for moving the /data folder for ES from this document.
https://assets.nagios.com/downloads/nag ... Server.pdf
When I restart the service ES recreates the shard in the original installation directory /usr/local/elasticsearch/data
Thoughts, suggestions?
Thanks
Chris
https://assets.nagios.com/downloads/nag ... Server.pdf
When I restart the service ES recreates the shard in the original installation directory /usr/local/elasticsearch/data
Thoughts, suggestions?
Thanks
Chris
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: moving the data folder for ES
Did you edit /etc/sysconfig/elasticsearch as outlined on page 2 of that document?
to something like this
and then restart ES
to something like this
Code: Select all
DATA_DIR="/new/path/data"
Re: moving the data folder for ES
correct
I had set it to
DATA_DIR=/elasticsearch/data
/elasticsearch/data is on its own 1000G partition
I didnt change any of the the file folder variables.
I had set it to
DATA_DIR=/elasticsearch/data
/elasticsearch/data is on its own 1000G partition
I didnt change any of the the file folder variables.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: moving the data folder for ES
Can you show the results of the following commands
Code: Select all
ps -ef|grep elasticsearch
cat /etc/sysconfig/elasticsearch
Re: moving the data folder for ES
I would like too but,
I had to rebuild everything last night just so I could get the system setup today.
I would have to retrace my steps.
However if I did what I did before I think it will break again.
If the doc I refenced is correct I will do it again in my new deployment.
Your thoughts?
Thanks
I had to rebuild everything last night just so I could get the system setup today.
I would have to retrace my steps.
However if I did what I did before I think it will break again.
If the doc I refenced is correct I will do it again in my new deployment.
Your thoughts?
Thanks
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: moving the data folder for ES
I have done this procedure before without issue.
Unfortunately in order to see what is going wrong, I would need to see what ES is setting as the -Des.default.path.data which is derived from /etc/sysconfig/elasticsearch and would display in the ps -ef|grep elasticsearch command
Unfortunately in order to see what is going wrong, I would need to see what ES is setting as the -Des.default.path.data which is derived from /etc/sysconfig/elasticsearch and would display in the ps -ef|grep elasticsearch command
Re: moving the data folder for ES
Just updating apache with the certs etc.
Ill do change next
Thanks
Ill do change next
Thanks
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: moving the data folder for ES
Sounds goodnewmember wrote:Just updating apache with the certs etc.
Ill do change next
Thanks
Re: moving the data folder for ES
Okay
I made an error in my etc so a started an entire new vm.
First thing I did was mount my 1TB drive
Then I installed LS
Then I went to move ES data.
I have attached the CLI steps.
Here is login error I get from the login page:
Login
The username specified does not exist.
In the logs i attached:
You will also notice the the shard has also been recreated in the original spot, I assume my user account is missing from the new shard in the original folder.
One additional note:
Ubuntu 18.04 puts the service in this file, not whats listed in the doc
/etc/init.d/elasticsearch
https://assets.nagios.com/downloads/nag ... Server.pdf
Changing Path
Now you need to change the configuration to point Nagios Log Server to the new data path. Open the file
/etc/sysconfig/elasticsearch in vi by executing the following command:
I made an error in my etc so a started an entire new vm.
First thing I did was mount my 1TB drive
Then I installed LS
Then I went to move ES data.
I have attached the CLI steps.
Here is login error I get from the login page:
Login
The username specified does not exist.
In the logs i attached:
You will also notice the the shard has also been recreated in the original spot, I assume my user account is missing from the new shard in the original folder.
One additional note:
Ubuntu 18.04 puts the service in this file, not whats listed in the doc
/etc/init.d/elasticsearch
https://assets.nagios.com/downloads/nag ... Server.pdf
Changing Path
Now you need to change the configuration to point Nagios Log Server to the new data path. Open the file
/etc/sysconfig/elasticsearch in vi by executing the following command:
You do not have the required permissions to view the files attached to this post.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: moving the data folder for ES
Sorry I didn't realuse you were on Ubuntu, and I now see the document needs to be updated.
The file the DATA_DIR needs to be edited in is /etc/default/elasticsearch instead of /etc/sysconfig/elasticsearch.
You edited them in the init script but that file has this disclaimer just above where you edited them
$DEFAULT on Unbuntu is /etc/default/elasticsearch
I will have out team get the document updated for Ubuntu.
Sorry for the confusion
The file the DATA_DIR needs to be edited in is /etc/default/elasticsearch instead of /etc/sysconfig/elasticsearch.
You edited them in the init script but that file has this disclaimer just above where you edited them
Code: Select all
# The following variables can be overwritten in $DEFAULT
I will have out team get the document updated for Ubuntu.
Sorry for the confusion