Help Center/
MapReduce Service/
Component Operation Guide (LTS) (Ankara Region)/
Using Elasticsearch/
Custom Data Directory
Updated on 2024-11-29 GMT+08:00
Custom Data Directory
Scenario
- The data directory of the host is not planned based on the Elasticsearch requirements.
- A single Elasticsearch instance requires multiple disks.
Data loss may occur during data directory replacement. Therefore, customize data directories before writing data into directories.
Prerequisites
- The administrator has planned data directories for hosts based on service requirements.
- If multiple data disks are configured, each EsNodeX uses the same number of disks.
Procedure
- Log in to Manager.
- On Manager, choose Cluster > Name of the desired cluster > Services > Elasticsearch > Configurations > All Configurations > Role Name > Data Storage.
- Change the value of elasticsearch.data.path to the corresponding data directory.
- Repeat the preceding steps to change the data directories of other Elasticsearch roles to ensure that each EsNodeX role uses the same number of disks.
- After the modification, click Save in the upper left corner. In the dialog box displayed, click OK.
- Choose Cluster > Name of the desired cluster > Services > Elasticsearch > Instance. On the displayed page, select the instances whose Configuration Status is Expired, choose More > Restart Instance, and restart the instance.
Suggestions in Multi-Disk Scenarios
- Plan the size of the service index in advance. Use the "alias + rollover" mode to roll over the index. Ensure that the size of each shard ranges from 20 GB to 30 GB to avoid disk imbalance caused by oversized and undersized shards.
- Use disks of the same specifications and size to prevent the bucket effect caused by a small disk capacity.
- Set copies for all indexes. Otherwise, data will be lost if the disk is damaged.
- When creating an index, set the total_shards_per_nodes parameter to evenly distribute the shards of each index to different instances in the cluster.
- If a disk is faulty, repair or replace it in a timely manner.
Parent topic: Using Elasticsearch
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot