-
Notifications
You must be signed in to change notification settings - Fork 344
volumes data folder not working #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@nathan-zhu Data on elasticsearch is stored in /var/lib/elasticsearch |
No, the data for the image is configured by the elastic.co apt package to be in $ docker run -d --name elsa -v /home/docker/test/esdata/:/usr/share/elasticsearch/data elasticsearch:2.4 -Des.cluster.name=workagram -Des.node.master=true -Des.node.data=true
29e6b9c886aa8e2eaac1ab29c8431434eb54184215d7ac5518e21ab568c46e19
$ curl -XPUT ip-of-container:9200/abctest
$ docker exec -it elsa ls -l /usr/share/elasticsearch/data/workagram/nodes/0/indices/abctest
total 24
drwxr-sr-x 5 elasticsearch elasticsearch 4096 Oct 19 21:40 0
drwxr-sr-x 5 elasticsearch elasticsearch 4096 Oct 19 21:40 1
drwxr-sr-x 5 elasticsearch elasticsearch 4096 Oct 19 21:40 2
drwxr-sr-x 5 elasticsearch elasticsearch 4096 Oct 19 21:40 3
drwxr-sr-x 5 elasticsearch elasticsearch 4096 Oct 19 21:40 4
drwxr-sr-x 2 elasticsearch elasticsearch 4096 Oct 19 21:40 _state
$ ls -l ../test/esdata/workagram/nodes/0/indices/abctest/
total 24
drwxr-sr-x 5 105 108 4096 Oct 19 14:40 0
drwxr-sr-x 5 105 108 4096 Oct 19 14:40 1
drwxr-sr-x 5 105 108 4096 Oct 19 14:40 2
drwxr-sr-x 5 105 108 4096 Oct 19 14:40 3
drwxr-sr-x 5 105 108 4096 Oct 19 14:40 4
drwxr-sr-x 2 105 108 4096 Oct 19 14:40 _state I think the root of the problem is the |
I'm having same issue trying to mount the config and data folders on 2.4:
I ssh'd into the image and can see the directories mounted, but elasticsearch fails to start properly: just the I literally copied the logging.yml from the image, but it does not work. What am I missing? |
@Tjorriemorrie, You may need to have a |
Folks - this may be a workaround but if anyone is running on a Mac, the reason why we can't see the persistent data in any subdirectory outside of /Users is because it is in the mounted directories in docker-machine. Here is how elasticsearch was started:
I added data using the TransportClient in a test in Eclipse. But this is not necessary. You can use curl as provided above to generate the indices. Now - if you go to /usr/local/data (which must exist) on your Mac, you will see nothing! No data. However, if you start and stop the image, the data will persist. Where is this data? It appears to be in the mounted directories in docker-machine. So if you ssh into docker-machine you can see your data.
|
This image is officially deprecated in favor of upstream's images (see https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html). For more information, please see #160, docker-library/docs#842, and docker-library/docs#945.
Thanks! |
Hi, I use official file of es 2.3
but I wannna use local data folder instead of /usr/share/elasticsearch/data folder in container,
this is my docker-compose file
and /opt/data/elasticsearch folder i give chmod 777 for it, after running docker-compose up -d,
docker ps show it running
and i can create new index there with
curl -XPUT 192.168.99.100:9200/abctest
but i check data folder there is nothing to show, what's wrong with my settings?
please help thanks.
The text was updated successfully, but these errors were encountered: