# How Does Elasticsearch Store Data?

**URL:** <https://discuss.elastic.co/t/how-does-elasticsearch-store-data/16276>\
**Category:** Elasticsearch\
**Created:** [March 10, 2014, 11:47pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-store-data/16276 "2014-03-10T23:47:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_Young](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@Marcus\_Young](https://discuss.elastic.co/u/Marcus_Young)\
**Post date:** [March 10, 2014, 11:47pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-store-data/16276/1 "2014-03-10T23:47:09Z")

</div>

I'm running Logstash with Redis, Kibana, and Elasticsearch.

All is working well. But when I look in the configured location for data,  
as set in the elasticsearch.yml file I see nothing. The directory is empty.

But I can see my data in Kibana and view it in Redis.

So where is Elasticsearch hiding it?

My config setting is: path.data: /var/lib/elasticsearch

...which is empty.

As I understand it Elasticsearch relies on Lucene which I thought stored  
data in flat files. If this is the case where are these files?

I need to know this so I can adequately plan storage.

Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7fe3bfb6-869f-42fa-9d84-de8238c78019%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7fe3bfb6-869f-42fa-9d84-de8238c78019%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Nii\_Hung](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@Nii\_Hung](https://discuss.elastic.co/u/Nii_Hung)\
**Post date:** [March 11, 2014, 4:59am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-store-data/16276/2 "2014-03-11T04:59:17Z")

</div>

I'm new to Elasticsearch and recently started playing around with version  
1.0.1. Just saw your question and noticed that the data files at

/data//nodes/0/indices//0/index/segment\_1

Note that lucene data is stored in segments.

On Mon, Mar 10, 2014 at 4:47 PM, Marcus Young [marcusdyoung@gmail.com](mailto:marcusdyoung@gmail.com)wrote:

> I'm running Logstash with Redis, Kibana, and Elasticsearch.
> 
> All is working well. But when I look in the configured location for data,  
> as set in the elasticsearch.yml file I see nothing. The directory is empty.
> 
> But I can see my data in Kibana and view it in Redis.
> 
> So where is Elasticsearch hiding it?
> 
> My config setting is: path.data: /var/lib/elasticsearch
> 
> ...which is empty.
> 
> As I understand it Elasticsearch relies on Lucene which I thought stored  
> data in flat files. If this is the case where are these files?
> 
> I need to know this so I can adequately plan storage.
> 
> Thanks.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/7fe3bfb6-869f-42fa-9d84-de8238c78019%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7fe3bfb6-869f-42fa-9d84-de8238c78019%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/7fe3bfb6-869f-42fa-9d84-de8238c78019%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/7fe3bfb6-869f-42fa-9d84-de8238c78019%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CA%2BpvUGXEzAuD3UV5R5bVXRcuWQzn%2BuYRUy1g2e2wiYTugeUsmg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BpvUGXEzAuD3UV5R5bVXRcuWQzn%2BuYRUy1g2e2wiYTugeUsmg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [March 11, 2014, 12:01pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-store-data/16276/3 "2014-03-11T12:01:51Z")

</div>

Hi Marcus,

You can find out where the data is by calling the nodes stats api and  
looking a the fs.data section. Assuming you are running 1.0 this will be:

curl -XGET "[http://localhost:9200/\_nodes/stats/fs](http://localhost:9200/_nodes/stats/fs)"

And yes, ES stores the data in lucene.

Cheers,  
Boaz

On Tuesday, March 11, 2014 12:47:09 AM UTC+1, Marcus Young wrote:

> I'm running Logstash with Redis, Kibana, and Elasticsearch.
> 
> All is working well. But when I look in the configured location for data,  
> as set in the elasticsearch.yml file I see nothing. The directory is empty.
> 
> But I can see my data in Kibana and view it in Redis.
> 
> So where is Elasticsearch hiding it?
> 
> My config setting is: path.data: /var/lib/elasticsearch
> 
> ...which is empty.
> 
> As I understand it Elasticsearch relies on Lucene which I thought stored  
> data in flat files. If this is the case where are these files?
> 
> I need to know this so I can adequately plan storage.
> 
> Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/190cba30-874b-4f81-b6dd-005907781fa6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/190cba30-874b-4f81-b6dd-005907781fa6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:44am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-store-data/16276/4 "2017-07-06T01:44:15Z")

</div>


