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

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 [{}]

Can you show us your settings?

yes, elasticsearch.yml like below

cluster.name: elasticsearch
node.name: node1
network.host: 0.0.0.0

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

That looks standard.

Can you show us the entire log?

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]
balabala
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 [{}]

Is that the entire output?

yes, that is

What's df and mount show?


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

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

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

Seagate's HDD or intel SSD

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?

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?

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.

Rob

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?

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