Failed to obtain node locks, tried [/usr/share/elasticsearch/data]; maybe these locations are not writable or multiple nodes were started on the same data path?

I use k8s built a ela cluster, I in the yaml document data directory: / usr/share/elasticsearch/data local hostpath path is: / data/elasticsearch/data

  • This is directory permission information:
    drwxr-xr-x. 3 1000 1000 18 Feb 22 11:25 elasticsearch

What if we solved this problem, because we now have one data directory mounted in three containers

  • My elasticsearch image is version 8.6.0

Welcome to our community! :smiley:

You can't do that, you need to have something like /data/elasticsearch/data0, /data/elasticsearch/data1, /data/elasticsearch/data2, ie specific directories for each node.

  • I see what you mean,How do I set up a different data directory for each node in the cluster?

In k8s

Each master and data node pod need a dedicated persistent volume.

I understand what you mean, but I am not sure how to add a private data directory for each container of ela cluster in k8s

That is a k8s question and not directly related to Elasticsearch, so I will leave that for someone else.

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