# Path.data and path.log not used

**URL:** <https://discuss.elastic.co/t/path-data-and-path-log-not-used/263912>\
**Category:** Elasticsearch\
**Created:** [February 10, 2021, 5:32pm UTC](https://discuss.elastic.co/t/path-data-and-path-log-not-used/263912 "2021-02-10T17:32:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Pevec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_pevec/32/82110_2.png) [@Mark\_Pevec](https://discuss.elastic.co/u/Mark_Pevec)\
**Post date:** [February 10, 2021, 5:32pm UTC](https://discuss.elastic.co/t/path-data-and-path-log-not-used/263912/1 "2021-02-10T17:32:45Z")

</div>

I am running Elasticsearch on VMs in Google Cloud (using the standard latest 7.x debian package installation) and am trying out different configurations. I recently tried to run a cluster with VMs with local SSD (local disks connected to VM via nvme, like instance store in AWS). I formatted and mounted the drive properly (to the path /mnt/data) and updated the elasticsearch.yml configuration to set path.data: /mnt/data/lib and path.logs: /mnt/data/log) but when I start elasticsearch it uses the defaults /var/lib/elasticsearch and /var/log/elasticsearch instead.

I'm wondering if this may be happening because the machine I installed elasticsearch on was different (it was a packer build machine). Does the elasticsearch.yml configuration need to be updated before running systemctl enable elasticsearch.service?

I install elasticsearch and run the commands systemctl daemon-reload and systemctl enable elasticsearch.service (as well as some of the other system configuration) in the packer build machine and export the image and then when I create the cluster VMs I use that image and when booting I complete the installation by updating elasticsearch.yml and running systemctl start elasticsearch.service. Is that approach not valid?

I also had tried restoring a snapshot taken from a previous cluster that used the default paths (/var/lib/elasticsearch and /var/log/elasticsearch). Would that be a possible cause of the issue?

---

<div class="post-metadata">

**Author:** ![Mark\_Pevec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_pevec/32/82110_2.png) [@Mark\_Pevec](https://discuss.elastic.co/u/Mark_Pevec)\
**Post date:** [February 10, 2021, 7:00pm UTC](https://discuss.elastic.co/t/path-data-and-path-log-not-used/263912/2 "2021-02-10T19:00:14Z")

</div>

I found the cause of this issue. I didn't realize that systemctl enable elasticsearch.service sets the service to start immediately at the next boot and so it started before I updated the elasticsearch.yml configuration during the boot up of the cluster VMs. When I removed that from the packer build script and did it in the actual cluster VM startup that resolved the issue

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 10, 2021, 7:00pm UTC](https://discuss.elastic.co/t/path-data-and-path-log-not-used/263912/3 "2021-03-10T19:00:46Z")

</div>

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