# Run ES on two servers and store the index in NAS

**URL:** <https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982>\
**Category:** Elasticsearch\
**Created:** [April 22, 2018, 1:00am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982 "2018-04-22T01:00:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aswinkumart](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@aswinkumart](https://discuss.elastic.co/u/aswinkumart)\
**Post date:** [April 22, 2018, 1:00am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/1 "2018-04-22T01:00:28Z")

</div>

Hello All,  
Is there a way to achieve the following approach?

I want to setup an High Availability on ES. I can setup an HAProxy on top of two different ES servers and route the traffic if one node is down. But my question is, If I store the Index data in a NAS drive (mounted across my two ES servers) can the ES 2 write the data from (2nd node) to the existing Index created by ES1 (First node)?

Example:

Filebeat -\> ElasticSearch (Server 1) -\> Index stored in NAS

if Server 1 goes down, I want to write the incoming logs to same index created in the above step

Filebeat -\> ElasticSearch (Server 2) -\> Use the above created Index and continue storing the data to NAS

Please let me know if it requires additional explanation.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 22, 2018, 5:49am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/2 "2018-04-22T05:49:00Z")

</div>

Just use local disks.  
Start 2 nodes. Elasticsearch will manage all that for you.

(Add a 3rd node is recommended for production)

---

<div class="post-metadata">

**Author:** ![aswinkumart](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@aswinkumart](https://discuss.elastic.co/u/aswinkumart)\
**Post date:** [April 23, 2018, 12:52am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/3 "2018-04-23T00:52:37Z")

</div>

can you elaborate "start 2 nodes" please? you mean I can use two different servers to run nodes locally and ES will distribute the load among them?

what happens when Node 1 goes down? the storage will not be available from Node 1 right?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 23, 2018, 3:51am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/4 "2018-04-23T03:51:14Z")

</div>

Just try it.  
As I said, elasticsearch will manage all that for you.

---

<div class="post-metadata">

**Author:** ![aswinkumart](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@aswinkumart](https://discuss.elastic.co/u/aswinkumart)\
**Post date:** [April 23, 2018, 6:17pm UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/5 "2018-04-23T18:17:37Z")

</div>

Is there any documentation available to start 2 ES nodes which you can share please?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 24, 2018, 4:24am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/6 "2018-04-24T04:24:20Z")

</div>

Locally? For testing?

Or in production?

Anyway, I'd recommend reading this: [https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html)

---

<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:** [May 22, 2018, 4:24am UTC](https://discuss.elastic.co/t/run-es-on-two-servers-and-store-the-index-in-nas/128982/7 "2018-05-22T04:24:31Z")

</div>

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