# Unable to set path.data for ES

**URL:** https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351
**Category:** Elasticsearch
**Created:** [January 15, 2013, 1:38pm UTC](https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351 "2013-01-15T13:38:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shadyabhi](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shadyabhi](https://discuss.elastic.co/u/shadyabhi)
#### Post date: [January 15, 2013, 1:38pm UTC](https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351/1 "2013-01-15T13:38:54Z")

</div>

Hi,

I have two mount points: /data1 & /data2. I want to use these two mount  
points for all the data stored by ES.

To do that, I added  
path.data: ["/data1", "/data2"]  
in my elasticsearch.yml.

After that, I restarted ES and still "pgrep -fl elas" shows:

20642 java -Xms4g -Xmx10g -Xss256k -Djava.awt.headless=true  
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC  
-XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly  
-XX:+HeapDumpOnOutOfMemoryError -Delasticsearch  
-Des.pidfile=/var/run/elasticsearch/elasticsearch.pid  
-Des.path.home=/usr/share/java/elasticsearch -cp  
:/usr/share/java/elasticsearch/lib/elasticsearch-0.19.12.jar:/usr/share/java/elasticsearch/lib/_:/usr/share/java/elasticsearch/lib/sigar/_  
-Des.config=/etc/elasticsearch/elasticsearch.yml  
-Des.path.conf=/etc/elasticsearch  
-Des.path.home=/usr/share/java/elasticsearch  
-Des.path.logs=/var/log/elasticsearch  
-Des.path.data=/var/lib/elasticsearch -Des.path.work=/tmp/elasticsearch  
-Des.path.plugins=/usr/share/java/elasticsearch/plugins  
org.elasticsearch.bootstrap.ElasticSearch

Note the path.data value as "-Des.path.data=/var/lib/elasticsearch". Am  
I missing something obvious?

--  
Cheers,  
Abhijeet R

> **[Abhijeet's Blog](https://blog.abhijeetr.com/)**
>
> I write about problems that I solve

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [January 15, 2013, 7:36pm UTC](https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351/2 "2013-01-15T19:36:36Z")

</div>

The elasticsearch.yml is controlling the settings of the elasticsearch  
after it's started. The settings that you see in pgrep output are  
controlled by the script that starts elasticsearch. So, you need to modify  
parameters of this script. For example, if you are running it on Ubuntu  
using standard .deb package, you can configure these settings in the  
/etc/default/elasticsearch file.

On Tuesday, January 15, 2013 8:39:56 AM UTC-5, Abhijeet Rastogi wrote:

> Hi,
> 
> I have two mount points: /data1 & /data2. I want to use these two mount  
> points for all the data stored by ES.
> 
> To do that, I added  
> path.data: ["/data1", "/data2"]  
> in my elasticsearch.yml.
> 
> After that, I restarted ES and still "pgrep -fl elas" shows:
> 
> 20642 java -Xms4g -Xmx10g -Xss256k -Djava.awt.headless=true  
> -XX:+UseParNewGC -XX:+UseConcMarkSweepGC  
> -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly  
> -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch  
> -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid  
> -Des.path.home=/usr/share/java/elasticsearch -cp  
> :/usr/share/java/elasticsearch/lib/elasticsearch-0.19.12.jar:/usr/share/java/elasticsearch/lib/_:/usr/share/java/elasticsearch/lib/sigar/_
> 
> -Des.config=/etc/elasticsearch/elasticsearch.yml  
> -Des.path.conf=/etc/elasticsearch  
> -Des.path.home=/usr/share/java/elasticsearch  
> -Des.path.logs=/var/log/elasticsearch  
> -Des.path.data=/var/lib/elasticsearch -Des.path.work=/tmp/elasticsearch  
> -Des.path.plugins=/usr/share/java/elasticsearch/plugins  
> org.elasticsearch.bootstrap.Elasticsearch
> 
> Note the path.data value as "-Des.path.data=/var/lib/elasticsearch". Am  
> I missing something obvious?
> 
> --  
> Cheers,  
> Abhijeet R  
> [http://blog.abhijeetr.com](http://blog.abhijeetr.com)

--

---

<div class="post-metadata">

### Author: ![shadyabhi](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shadyabhi](https://discuss.elastic.co/u/shadyabhi)
#### Post date: [January 16, 2013, 6:54am UTC](https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351/3 "2013-01-16T06:54:42Z")

</div>

Hi Igor,

So, do you mean to say that I have the settings already present in ES?  
Is there a way to verify this?

On 01/16/2013 01:06 AM, Igor Motov wrote:

> The elasticsearch.yml is controlling the settings of the elasticsearch  
> after it's started. The settings that you see in pgrep output are  
> controlled by the script that starts elasticsearch. So, you need to  
> modify parameters of this script. For example, if you are running it  
> on Ubuntu using standard .deb package, you can configure these  
> settings in the /etc/default/elasticsearch file.
> 
> On Tuesday, January 15, 2013 8:39:56 AM UTC-5, Abhijeet Rastogi wrote:
> 
> ```
> Hi,
> 
> I have two mount points: /data1 & /data2. I want to use these two
> mount
> points for all the data stored by ES.
> 
> To do that, I added
> path.data: ["/data1", "/data2"]
> in my elasticsearch.yml.
> 
> After that, I restarted ES and still "pgrep -fl elas" shows:
> 
> 20642 java -Xms4g -Xmx10g -Xss256k -Djava.awt.headless=true
> -XX:+UseParNewGC -XX:+UseConcMarkSweepGC
> -XX:CMSInitiatingOccupancyFraction=75
> -XX:+UseCMSInitiatingOccupancyOnly
> -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch
> -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid
> -Des.path.home=/usr/share/java/elasticsearch -cp
> :/usr/share/java/elasticsearch/lib/elasticsearch-0.19.12.jar:/usr/share/java/elasticsearch/lib/*:/usr/share/java/elasticsearch/lib/sigar/*
> 
> -Des.config=/etc/elasticsearch/elasticsearch.yml
> -Des.path.conf=/etc/elasticsearch
> -Des.path.home=/usr/share/java/elasticsearch
> -Des.path.logs=/var/log/elasticsearch
> -Des.path.data=/var/lib/elasticsearch
> -Des.path.work=/tmp/elasticsearch
> -Des.path.plugins=/usr/share/java/elasticsearch/plugins
> org.elasticsearch.bootstrap.ElasticSearch
> 
> Note the path.data value as
> "-Des.path.data=/var/lib/elasticsearch". Am
> I missing something obvious?
> 
> -- 
> Cheers,
> Abhijeet R
> http://blog.abhijeetr.com
> 
> ```
> 
> --

--  
Cheers,  
Abhijeet R  
[http://blog.abhijeetr.com](http://blog.abhijeetr.com)

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [January 16, 2013, 12:03pm UTC](https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351/4 "2013-01-16T12:03:12Z")

</div>

Elasticsearch server can be configured using several methods. In your  
setup, it can be configured using system properties and config files. The  
system properties are checked first and based on the system properties  
elasticsearch finds directory with config files and loads config files from  
there. Some settings can be overwritten in the config files, but some  
settings are additive. So, for example, if you specify the path using  
system properties (that can be configured in /etc/default/elasticsearch  
file) and then in elasticsearch.yml file, you will end up with combination  
of both system property path and config file file paths as you data paths.  
If you have relatively new version of elasticsearch, you can check the  
effective properties by setting "node" logger to "DEBUG" in  
/etc/elasticsearch/logging.yml, restarting elasticsearch and checking log  
file at /var/log/elasticsearch/elasticsearch.log. If you set logger  
correctly, you will find the line like this in the log file:

[2013-01-16 06:41:44,197][DEBUG][node] [Banner, Betty  
Ross] using home [/usr/share/elasticsearch], config [/etc/elasticsearch],  
data [[/var/lib/elasticsearch]], logs [/var/log/elasticsearch], work  
[/tmp/elasticsearch], plugins [/usr/share/elasticsearch/plugins]

This line shows the effective environment settings that this elasticsearch  
node was started with.

On Wednesday, January 16, 2013 1:55:52 AM UTC-5, Abhijeet Rastogi wrote:

> Hi Igor,
> 
> So, do you mean to say that I have the settings already present in ES?  
> Is there a way to verify this?
> 
> On 01/16/2013 01:06 AM, Igor Motov wrote:
> 
> > The elasticsearch.yml is controlling the settings of the elasticsearch  
> > after it's started. The settings that you see in pgrep output are  
> > controlled by the script that starts elasticsearch. So, you need to  
> > modify parameters of this script. For example, if you are running it  
> > on Ubuntu using standard .deb package, you can configure these  
> > settings in the /etc/default/elasticsearch file.
> > 
> > On Tuesday, January 15, 2013 8:39:56 AM UTC-5, Abhijeet Rastogi wrote:
> > 
> > ```
> > Hi, 
> > 
> > I have two mount points: /data1 & /data2. I want to use these two 
> > mount 
> > points for all the data stored by ES. 
> > 
> > To do that, I added 
> > path.data: ["/data1", "/data2"] 
> > in my elasticsearch.yml. 
> > 
> > After that, I restarted ES and still "pgrep -fl elas" shows: 
> > 
> > 20642 java -Xms4g -Xmx10g -Xss256k -Djava.awt.headless=true 
> > -XX:+UseParNewGC -XX:+UseConcMarkSweepGC 
> > -XX:CMSInitiatingOccupancyFraction=75 
> > -XX:+UseCMSInitiatingOccupancyOnly 
> > -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch 
> > -Des.pidfile=/var/run/elasticsearch/elasticsearch.pid 
> > -Des.path.home=/usr/share/java/elasticsearch -cp 
> > 
> > ```
> 
> :/usr/share/java/elasticsearch/lib/elasticsearch-0.19.12.jar:/usr/share/java/elasticsearch/lib/_:/usr/share/java/elasticsearch/lib/sigar/_
> 
> > ```
> > -Des.config=/etc/elasticsearch/elasticsearch.yml 
> > -Des.path.conf=/etc/elasticsearch 
> > -Des.path.home=/usr/share/java/elasticsearch 
> > -Des.path.logs=/var/log/elasticsearch 
> > -Des.path.data=/var/lib/elasticsearch 
> > -Des.path.work=/tmp/elasticsearch 
> > -Des.path.plugins=/usr/share/java/elasticsearch/plugins 
> > org.elasticsearch.bootstrap.ElasticSearch 
> > 
> > Note the path.data value as 
> > "-Des.path.data=/var/lib/elasticsearch". Am 
> > I missing something obvious? 
> > 
> > -- 
> > Cheers, 
> > Abhijeet R 
> > http://blog.abhijeetr.com 
> > 
> > ```
> > 
> > --
> 
> --  
> Cheers,  
> Abhijeet R  
> [http://blog.abhijeetr.com](http://blog.abhijeetr.com)

--

---

<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: [July 6, 2017, 2:56am UTC](https://discuss.elastic.co/t/unable-to-set-path-data-for-es/10351/5 "2017-07-06T02:56:10Z")

</div>


