Sample Header Ad - 728x90

Store Elasticsearch shards in separate partitions on data node

0 votes
0 answers
276 views
I have an Elasticsearch cluster configured with one head node and three data nodes with the number of replicas set to 2. The data nodes are each split into three partitions called /data1 /data2 and /data3; the disk on each data node is partitioned. Elasticsearch is storing all the shards in the /data1 partition on each data node. The system has been working fine but now I want to add a new index and the /data1 partitions do not have space to store the new shards. How can I instruct the cluster to store the new shards on different disk partition? I looked at /etc/elasticsearch/elasticsearch.yml on the head node and path.data is set to /var/lib/elasticsearch. How do I modify path.data to use a different partition on the data nodes? Update: In response to the link posted in the comments, I modified the elasticsearch.yml to look like this: path.data: /data1/elasticsearch, /data2/elasticsearch_2, /data3/elasticsearch_3 And created the corresponding directories on the data nodes. However, I am still getting the node is above the low watermark warnings from two of the nodes and a the shard cannot be allocated to the same node on which a copy of the shard already exists from the third.
Asked by Matt (291 rep)
Apr 16, 2021, 07:28 PM
Last activity: Apr 20, 2021, 03:32 PM