Elasticsearch cannot start when I use a hard disk mount to data path

(majx) #1

When i use file system , elasticsearch runs well, but if i mount a disk like /dev/sdk1 to data path /var/lib/elasticsearch, then elasticsearch cannot work any more.
And the log like this:
[2017-05-20 13:14] [INFO][plugins ] [node1] loaded [analysis-ik], sites [head]
[2017-05-20 13:14] [DEBUG][common.compress.lzf] using encoder [VanillaChunkDecoder] and decoder [{}]

(Mark Walkom) #2

Can you show us your settings?

(majx) #3

yes, elasticsearch.yml like below

cluster.name: elasticsearch
node.name: node1

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

(Mark Walkom) #4

That looks standard.

Can you show us the entire log?

(majx) #5

Normally, the log contains
[2017-05-09 18:01:07,752][INFO ][node ] [node1] initializing ...
[2017-05-09 18:01:08,037][INFO ][plugins ] [node0] loaded [analysis-ik], sites [head, hq]
[2017-05-09 18:01:08,188][INFO ][env ] [node1] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [4.7gb], net total_space [7.8gb], types [rootfs]
but when i mount disk to data path, only
[2017-05-09 18:01:07,752][INFO ][node ] [node1] initializing ...
[2017-05-09 18:01:08,037][INFO ][plugins ] [node0] loaded [analysis-ik], sites [head, hq]
[2017-05-09 18:01:08,037] [DEBUG][common.compress.lzf] using encoder [VanillaChunkDecoder] and decoder [{}]

(Mark Walkom) #6

Is that the entire output?

(majx) #7

yes, that is

(Mark Walkom) #8

What's df and mount show?

(majx) #9

(Mark Walkom) #10

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

(majx) #11

can you see that,? because my project is located at intranet´╝î copying the message is difficult

(Christian Dahlqvist) #12

What kind of disk are you trying to run Elasticsearch on?

(majx) #13

Seagate's HDD or intel SSD

(Christian Dahlqvist) #14

I am not sure I understand. How is it set up when it works? What changes do you make before it no longer works? Can you read and write to the mounted disk?

(majx) #15

I also don't know what happens before es start , i can write and read file in disk. But there is a problem:
Elasticsearch can write dir with the cluster name and file node.lock in data path, but cannot write data associated with lucene, this is the key question.
temporarily i can umount data path, remount it again, then es goes well, like below
umount -l /var/lib/elasticsearch
mount /dev/sdk1 /var/lib/elasticsearch

Does anybody know something about why lucene cannot write data to disk?

(Robert Cowart) #16

I didn't see mention of permissions being set (although I admit to just scanning the thread). Perhaps try...

chown -R elasticsearch:elasticsearch /var/lib/elasticsearch

I have made this mistake before when mounting a new filesystem and configuring Elasticsearch to use it.


(majx) #17

Thank you for attention, my elasticsearch version is 1.7.1, root user is allowed, so i use root user and group for elasticsearch, is there any rule that elasticsearch must start with elasticsearch user and group?

(system) #18

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.