Elasticsearch Directory Move Into New Partition (Example /home)
***Login as root or any user that NOT using /home
***Stop elasticsearch service
***Make sure SELINUX is permissive mode. View file /etc/selinux/config
To backup the contents of /home, do the following: mkdir /newhome cp -rfp /home/* /newhome
Make sure your / is still enough df -h Once that is finished at your back at the prompt, you can proceed to step 2.
umount -fl /home
rmdir /home
mv /newhome /home
Using your preferred text editor, ensure you open /etc/fstab and change of the line for /dev/mapper/cl-home (mount point at the beginning of line) Change only word /home to /var/lib/elasticsearch
mv /var/lib/elasticsearch /var/lib/elasticsearch-old
mkdir /var/lib/elasticsearch
chown elasticsearch:elasticsearch /var/lib/elasticsearch
mount /var/lib/elasticsearch
To copy the contents of /var/lib/elasticsearch-old, do the following: chown elasticsearch:elasticsearch /var/lib/elasticsearch cp -rfp /var/lib/elasticsearch-old/* /var/lib/elasticsearch
df -h
Run the following command to sync systemd up with the changes. dracut --regenerate-all --force