Created
October 21, 2024 09:49
-
-
Save goors/f7db235a27303d6a8bba01f8c502ed04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y rsync | |
sudo mkfs.ext4 /dev/disk/azure/scsi1/lun$1 | |
sudo mkdir -p /mnt/data | |
sudo mount /dev/disk/azure/scsi1/lun$1 /mnt/data | |
sudo rsync -av /var/lib/elasticsearch/ /mnt/data/ | |
echo "/dev/disk/azure/scsi1/lun$1 /mnt/data ext4 defaults 0 0" | sudo tee -a /etc/fstab | |
sudo sed -i 's|path.data: /var/lib/elasticsearch|path.data: /mnt/data|g' /etc/elasticsearch/elasticsearch.yml | |
sudo systemctl restart elasticsearch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment