# How do I storage ES data into HDFS

**URL:** https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902
**Category:** Elasticsearch
**Created:** [September 17, 2020, 2:45am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902 "2020-09-17T02:45:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vpzlin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vpzlin/32/77843_2.png) [@vpzlin](https://discuss.elastic.co/u/vpzlin)
#### Post date: [September 17, 2020, 2:45am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902/1 "2020-09-17T02:45:16Z")

</div>

Hello guys, I'm using ElasticSearch 6.6.0. Recently I recieved a requirement that ES data should storage into HDFS, because Solr can do this.  
So I mounted HDFS as a local path '/esdata' by HDFS NFS3 Gateway, and set data path to this, but when I started a single node ElasticSearch and created an empty index 'test\_idx' without mapping, it failed, and threw exception as below:

org.elasticsearch.indices.recovery.RecoveryFailedException: [test\_idx][1]: Recovery failed on {node-1}{...}{...}{ip}{ip:port}{ml.machine\_memory=8202268368, xpack.installed=true, ml.max\_open\_jobs=20, ml.enabled=true}  
...  
...  
Caused by: org.elasticsearch.index.shard.IndexShardRecoveryException: failed to recover from gateway  
...  
...  
Caused by: java.io.IOException: Invalid argument

These 2 discussion below shows that ES could use HDFS for storage in costin's opinion(one member of ElasticSearch):  
[https://discuss.elastic.co/t/can-elasticsearch-reads-and-stores-data-in-hdfs-by-es-hadoop/40713/2](https://discuss.elastic.co/t/can-elasticsearch-reads-and-stores-data-in-hdfs-by-es-hadoop/40713/2)  
[https://github.com/elastic/elasticsearch/issues/9072](https://github.com/elastic/elasticsearch/issues/9072)

I don't know how to fix this. It shows that "File append is supported but random write is not supported." in hadoop official site's partition "HDFS NFS Gateway".  
I have tried some tests after mounting HDFS, the mounting path is "/esdata":  
(1) echo 111 \> /esdata/1.log # success  
(2) touch /esdata/1.log # success  
echo 111 \> /esdata/1.log # success  
(3) echo 111 \> /esdata/1.log # success  
echo 111 \> /esdata/1.log # failed, do again  
(4) echo 111 \> /esdata/1.log # success  
echo 111 \>\> /esdata/1.log # success, do again  
(5) echo 111 \>\> /esdata/1.log # success  
echo 111 \>\> /esdata/1.log # success, do again

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 17, 2020, 2:47am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902/2 "2020-09-17T02:47:22Z")

</div>

Welcome to our community! 😃 We aren't all guys though,

Please be aware that we do not recommend or support running on HDFS. Running a distributed system on a distributed filesystem is not a great idea.

---

<div class="post-metadata">

### Author: ![vpzlin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vpzlin/32/77843_2.png) [@vpzlin](https://discuss.elastic.co/u/vpzlin)
#### Post date: [September 17, 2020, 3:02am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902/3 "2020-09-17T03:02:07Z")

</div>

Thanks for your reply.  
But Solr can use HDFS to storage data.  
Is there any plan to support ES storage data into HDFS in the future?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 17, 2020, 3:40am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902/4 "2020-09-17T03:40:47Z")

</div>

Not officially, no.

---

<div class="post-metadata">

### Author: ![vpzlin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vpzlin/32/77843_2.png) [@vpzlin](https://discuss.elastic.co/u/vpzlin)
#### Post date: [September 17, 2020, 3:42am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902/5 "2020-09-17T03:42:12Z")

</div>

alright, thanks.

---

<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: [October 15, 2020, 3:42am UTC](https://discuss.elastic.co/t/how-do-i-storage-es-data-into-hdfs/248902/6 "2020-10-15T03:42:12Z")

</div>

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