# Index sharing in 3 nodes cluster

**URL:** <https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353>\
**Category:** Elasticsearch\
**Created:** [August 8, 2017, 11:28pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353 "2017-08-08T23:28:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![extramental](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@extramental](https://discuss.elastic.co/u/extramental)\
**Post date:** [August 8, 2017, 11:28pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/1 "2017-08-08T23:28:31Z")

</div>

Hi,

I am trying to set up a three node cluster on Elasticsearch 2.3 with PeopleSoft 9.2/8.55 Tools.

Three nodes on three Linux VM. Each node is master and data eligible. I need to setup the failover functionaity so that even if two of the nodes are going down, my third node should be elected as a Master and handle the write/index operations.  
As of now I have set the Zen.discovery.minimum\_master\_node to 1 so that at any point of time one of the nodes will act as a Master even though it is not recommended. Will it be feasible?

Next questions is how can I confirm the indices are getting shared automatically?  
Because when I do a 'du -sh \*' at $ES\_DATA/Cluster\_Name/nodes I am getting different size for three different nodes.  
With three nodes up and running I am getting say- 100 search results in PeopleSoft GUI. If I bring down one of the nodes it shows me 70-odd search results.  
The search result again comes down if two of the nodes are down.

Please ignore the beginner-level naive question up next.  
On all the forums I read about using the cluster health API to monitor health. But how do I use that on Linux machine?

Please suggest.

Thanks

---

<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:** [August 9, 2017, 5:53am UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/2 "2017-08-09T05:53:52Z")

</div>

> [@extremental](#):
>
> As of now I have set the Zen.discovery.minimum\_master\_node to 1 so that at any point of time one of the nodes will act as a Master even though it is not recommended. Will it be feasible?

With 3 master/data nodes in a cluster, you need a minimum of two available for it to operate properly and prevent data loss and split brain scenarios. Allowing the cluster to accept reade and write with only a single node available will mean that you risk losing data.

In order to ensure that all nodes hold a copy of all data, you will need to set the number of replicas on all indices to 2.

---

<div class="post-metadata">

**Author:** ![extramental](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@extramental](https://discuss.elastic.co/u/extramental)\
**Post date:** [August 9, 2017, 6:15am UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/3 "2017-08-09T06:15:59Z")

</div>

Thanks, Christian. I understand the point you are making.  
In that case then how does the failover work if two of the nodes are getting down.  
I am bringing the master nodes down one by one untill there is only one node left. Then will the last node make itself master?

And talking about parameters, do I have to specify the no. of replicas or shards or any other specific parameters for the data to be synced across all the nodes with minimum node set to two?

We are putting the data at a nfs drive which is shared across all three VM. Is that a good idea or all nodes should have their own data path? What is the logic behind path.shared\_data parameter?

Any help in this regard will be appreciated. Thanks again.

---

<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:** [August 9, 2017, 6:39am UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/4 "2017-08-09T06:39:47Z")

</div>

> [@extremental](#):
>
> I am bringing the master nodes down one by one untill there is only one node left. Then will the last node make itself master?

Not if you have configured the cluster correctly, as this could lead to data loss. A minimum of 2 ondes is required for a fully functional cluster.

> [@extremental](#):
>
> And talking about parameters, do I have to specify the no. of replicas or shards or any other specific parameters for the data to be synced across all the nodes with minimum node set to two?

You can specify this through index templates.

> [@extremental](#):
>
> We are putting the data at a nfs drive which is shared across all three VM. Is that a good idea or all nodes should have their own data path?

Using NFS is generally not a good idea. All nodes should have separate data patos and local disks are recommended.

---

<div class="post-metadata">

**Author:** ![extramental](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@extramental](https://discuss.elastic.co/u/extramental)\
**Post date:** [August 9, 2017, 6:52am UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/5 "2017-08-09T06:52:55Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> Not if you have configured the cluster correctly, as this could lead to data loss. A minimum of 2 ondes is required for a fully functional cluster

So correct me if I am wrong. In a three-node cluster the functionaity of such failover cannot be obtained. If cluster is configured properly, 1st master node down, then second master is also brought down, in that case third node will not declare itself as master becasue minimum node requirement is not fulfilled.

> [@Christian\_Dahlqvist](#):
>
> You can specify this through index tem

Could you please elaborate on this? I am completly new in this area.

---

<div class="post-metadata">

**Author:** ![extramental](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@extramental](https://discuss.elastic.co/u/extramental)\
**Post date:** [August 24, 2017, 4:58pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/6 "2017-08-24T16:58:45Z")

</div>

Guys, need some help if you please. Still facing the same issue of data loss.

---

<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:** [August 24, 2017, 5:03pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/7 "2017-08-24T17:03:15Z")

</div>

Did you set `zen.discovery.minimum_master_nodes` to `2` in order to protect yourself against split-brain scenarios and data loss?

---

<div class="post-metadata">

**Author:** ![extramental](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@extramental](https://discuss.elastic.co/u/extramental)\
**Post date:** [August 24, 2017, 5:06pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/8 "2017-08-24T17:06:45Z")

</div>

Thank you, Christian for your response. Yes, I did set it to two.  
Let me explain what I am referring to when I say data loss.

With all three nodes running, I am getting, say 100 rows in search result.  
With one node down, two nodes up I am getting 50 rows in search result.

This occurs even after setting index.no\_of\_replica to two.

---

<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:** [August 24, 2017, 5:14pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/9 "2017-08-24T17:14:39Z")

</div>

That sounds strange. Can you provide the output from the [cat shards API](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/cat-shards.html) for some off the indices where you see this problem?

---

<div class="post-metadata">

**Author:** ![extramental](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@extramental](https://discuss.elastic.co/u/extramental)\
**Post date:** [August 25, 2017, 6:52pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/10 "2017-08-25T18:52:03Z")

</div>

Hi Christian,

I will try to get the output soon.

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:** [September 22, 2017, 6:52pm UTC](https://discuss.elastic.co/t/index-sharing-in-3-nodes-cluster/96353/11 "2017-09-22T18:52:47Z")

</div>

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