# Elasticsearch not adding cluster\_name to datafiles location (path.data)

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992>\
**Category:** Elasticsearch\
**Created:** [November 9, 2018, 7:02am UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992 "2018-11-09T07:02:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 9, 2018, 7:02am UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/1 "2018-11-09T07:02:43Z")

</div>

Hi

Elasticsearch 6.4.3

I did not notice this before, but why is that, if I have in elasticsearch.yml file:

> path.data: "/elastic/data/"

Then my files are created under:

> \<\<path.data\>\>/nodes/0/...

In 1.7.2, I also have the same value for path.data:

> path.data: "/elastic/data/"

But in 1.7.2, files are created under:

> \<\<path.data\>\>/ **\<\<cluster\_name\>\>** /nodes/0/...

Why do they lose the cluster\_name from this path..?

In 6.x, should I change path.data to..?

> path.data: "/elastic/data/ **\<\<cluster\_name\>\>** /"

Or is there some other (better) approach for having **cluster\_name** in its path..?  
What are your recommendations.

Thanks.

Regards  
Raul

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 9, 2018, 7:05am UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/2 "2018-11-09T07:05:30Z")

</div>

Why do you need the cluster name in the data path?

---

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 9, 2018, 11:35am UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/3 "2018-11-09T11:35:16Z")

</div>

Hmm, would be nice, structurally, I guess..

But what would be the reason why they dropped this..?

Regards  
Raul

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 9, 2018, 11:51am UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/4 "2018-11-09T11:51:33Z")

</div>

I do not know, but as you should not interact directly with the file system anyway, it should not matter.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 9, 2018, 2:08pm UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/5 "2018-11-09T14:08:51Z")

</div>

> [@raulk89](#):
>
> But what would be the reason why they dropped this..?

The reason for dropping the cluster name from the path in 5.0 was that it may contain weird characters that aren't legal in a directory name (or which are only legal on some operating systems). It was removed entirely because there's no need to have multiple clusters under a single path.

---

<div class="post-metadata">

**Author:** ![raulk89](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@raulk89](https://discuss.elastic.co/u/raulk89)\
**Post date:** [November 9, 2018, 2:23pm UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/6 "2018-11-09T14:23:45Z")

</div>

Ok, fair enough, thanks for the explanation.

Regards  
Raul

---

<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:** [December 7, 2018, 2:23pm UTC](https://discuss.elastic.co/t/elasticsearch-not-adding-cluster-name-to-datafiles-location-path-data/155992/7 "2018-12-07T14:23:49Z")

</div>

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