# Elasticsearch cluster

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster/10499>\
**Category:** Elasticsearch\
**Created:** [January 24, 2013, 8:14pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499 "2013-01-24T20:14:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jimi\_Parekh](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Jimi\_Parekh](https://discuss.elastic.co/u/Jimi_Parekh)\
**Post date:** [January 24, 2013, 8:14pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/1 "2013-01-24T20:14:41Z")

</div>

To create multiple nodes in elasticsearh cluster, do we need to start the  
multiple elasticsearch instance?  
I have a one elasticsearch storage on one server. How can I create cluster  
with muliple nodes which reads the same storage?

-Jimi.

--

---

<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:** [January 24, 2013, 8:37pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/2 "2013-01-24T20:37:52Z")

</div>

Each node uses its own storage.  
But you can use SharedFS: [http://www.elasticsearch.org/guide/reference/modules/gateway/fs.html](http://www.elasticsearch.org/guide/reference/modules/gateway/fs.html)

But, why do you want to do that?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 janv. 2013 à 21:14, Jimi Parekh [jimiparekh@gmail.com](mailto:jimiparekh@gmail.com) a écrit :

To create multiple nodes in elasticsearh cluster, do we need to start the multiple elasticsearch instance?  
I have a one elasticsearch storage on one server. How can I create cluster with muliple nodes which reads the same storage?

## -Jimi.

--

---

<div class="post-metadata">

**Author:** ![drewr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drewr/32/7803_2.png) [@drewr](https://discuss.elastic.co/u/drewr)\
**Post date:** [January 24, 2013, 8:41pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/3 "2013-01-24T20:41:17Z")

</div>

Jimi Parekh wrote:

> To create multiple nodes in elasticsearh cluster, do we need to  
> start the multiple elasticsearch instance? I have a one  
> elasticsearch storage on one server. How can I create cluster with  
> muliple nodes which reads the same storage?

Start each node with the path.data parameter. A simple example would  
be:

bin/elasticsearch -Des.path.data=/data/es -f

You can also set it in elasticsearch.yml config file.

path.data: /data/es

-Drew

--

---

<div class="post-metadata">

**Author:** ![Jimi\_Parekh](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Jimi\_Parekh](https://discuss.elastic.co/u/Jimi_Parekh)\
**Post date:** [January 24, 2013, 8:56pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/4 "2013-01-24T20:56:13Z")

</div>

I have one elasticsearch index stored on server-1. Now I want to make sure  
if server-1 is down, still users can query the index and get the result.  
I am not sure whats the best possible way to accomplish it. I thought by  
adding new nodes i can do it.

On Thursday, January 24, 2013 3:37:52 PM UTC-5, David Pilato wrote:

> Each node uses its own storage.  
> But you can use SharedFS:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/modules/gateway/fs.html)
> 
> But, why do you want to do that?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 24 janv. 2013 à 21:14, Jimi Parekh \<[jimip...@gmail.com](mailto:jimip...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> To create multiple nodes in elasticsearh cluster, do we need to start the  
> multiple elasticsearch instance?  
> I have a one elasticsearch storage on one server. How can I create cluster  
> with muliple nodes which reads the same storage?
> 
> -Jimi.
> 
> --

--

---

<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:** [January 24, 2013, 9:02pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/5 "2013-01-24T21:02:36Z")

</div>

So just launch a new node and let Elasticsearch manage that for you.

All data are replicated on nodes by Elasticsearch so you don't have to share anything here.

HTH

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 janv. 2013 à 21:56, Jimi Parekh [jimiparekh@gmail.com](mailto:jimiparekh@gmail.com) a écrit :

> I have one elasticsearch index stored on server-1. Now I want to make sure if server-1 is down, still users can query the index and get the result.  
> I am not sure whats the best possible way to accomplish it. I thought by adding new nodes i can do it.
> 
> On Thursday, January 24, 2013 3:37:52 PM UTC-5, David Pilato wrote:
> 
> > Each node uses its own storage.  
> > But you can use SharedFS: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/modules/gateway/fs.html)
> > 
> > But, why do you want to do that?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 24 janv. 2013 à 21:14, Jimi Parekh [jimip...@gmail.com](mailto:jimip...@gmail.com) a écrit :
> > 
> > To create multiple nodes in elasticsearh cluster, do we need to start the multiple elasticsearch instance?  
> > I have a one elasticsearch storage on one server. How can I create cluster with muliple nodes which reads the same storage?
> > 
> > ## -Jimi.
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Jimi\_Parekh](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Jimi\_Parekh](https://discuss.elastic.co/u/Jimi_Parekh)\
**Post date:** [January 24, 2013, 9:46pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/6 "2013-01-24T21:46:35Z")

</div>

Thats what my confusion. Suppose I start new node on the same sever  
(server-1) and server-1 is down than none of the node will be  
availble,right?  
So I want to add a new node which runs on another server say ,server-2 but  
still access the same index as server-1. How to do that ?

On Thursday, January 24, 2013 4:02:36 PM UTC-5, David Pilato wrote:

> So just launch a new node and let Elasticsearch manage that for you.
> 
> All data are replicated on nodes by Elasticsearch so you don't have to  
> share anything here.
> 
> HTH
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 24 janv. 2013 à 21:56, Jimi Parekh \<[jimip...@gmail.com](mailto:jimip...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> I have one elasticsearch index stored on server-1. Now I want to make sure  
> if server-1 is down, still users can query the index and get the result.  
> I am not sure whats the best possible way to accomplish it. I thought by  
> adding new nodes i can do it.
> 
> On Thursday, January 24, 2013 3:37:52 PM UTC-5, David Pilato wrote:
> 
> > Each node uses its own storage.  
> > But you can use SharedFS:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/modules/gateway/fs.html)
> > 
> > But, why do you want to do that?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 24 janv. 2013 à 21:14, Jimi Parekh [jimip...@gmail.com](mailto:jimip...@gmail.com) a écrit :
> > 
> > To create multiple nodes in elasticsearh cluster, do we need to start the  
> > multiple elasticsearch instance?  
> > I have a one elasticsearch storage on one server. How can I create  
> > cluster with muliple nodes which reads the same storage?
> > 
> > -Jimi.
> > 
> > --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [January 25, 2013, 12:58am UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/7 "2013-01-25T00:58:02Z")

</div>

If the nodes are configured to use the same cluster name, and you have  
enough replicas provisioned (e.g. \> 0) then Elasticsearch will  
automatically migrate a replica to the new node and rebalance everything.

There isn't a good reason to start two nodes on the same server, other than  
testing how ES works.

On Thursday, January 24, 2013 4:46:35 PM UTC-5, Jimi Parekh wrote:

> Thats what my confusion. Suppose I start new node on the same sever  
> (server-1) and server-1 is down than none of the node will be  
> availble,right?  
> So I want to add a new node which runs on another server say ,server-2 but  
> still access the same index as server-1. How to do that ?
> 
> On Thursday, January 24, 2013 4:02:36 PM UTC-5, David Pilato wrote:
> 
> > So just launch a new node and let Elasticsearch manage that for you.
> > 
> > All data are replicated on nodes by Elasticsearch so you don't have to  
> > share anything here.
> > 
> > HTH
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 24 janv. 2013 à 21:56, Jimi Parekh [jimip...@gmail.com](mailto:jimip...@gmail.com) a écrit :
> > 
> > I have one elasticsearch index stored on server-1. Now I want to make  
> > sure if server-1 is down, still users can query the index and get the  
> > result.  
> > I am not sure whats the best possible way to accomplish it. I thought by  
> > adding new nodes i can do it.
> > 
> > On Thursday, January 24, 2013 3:37:52 PM UTC-5, David Pilato wrote:
> > 
> > > Each node uses its own storage.  
> > > But you can use SharedFS:  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/modules/gateway/fs.html)
> > > 
> > > But, why do you want to do that?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 24 janv. 2013 à 21:14, Jimi Parekh [jimip...@gmail.com](mailto:jimip...@gmail.com) a écrit :
> > > 
> > > To create multiple nodes in elasticsearh cluster, do we need to start  
> > > the multiple elasticsearch instance?  
> > > I have a one elasticsearch storage on one server. How can I create  
> > > cluster with muliple nodes which reads the same storage?
> > > 
> > > -Jimi.
> > > 
> > > --
> > 
> > --

---

<div class="post-metadata">

**Author:** ![pounraj\_manikandan](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@pounraj\_manikandan](https://discuss.elastic.co/u/pounraj_manikandan)\
**Post date:** [January 25, 2013, 7:52am UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/8 "2013-01-25T07:52:28Z")

</div>

Hello Jimi,

As David says Elasticsearch starts allocating shards according our setup whenever a new node has been added to the same cluster (if your index is not corrupted).

I believe below link will give you more detailed:  
[http://www.elasticsearch.org/guide/reference/modules/cluster.html  
 ](http://www.elasticsearch.org/guide/reference/modules/cluster.html)

If you start a new instance **in different machine** , copy the data directory from failed machine (if index is not crashed & the directory is not shard to new machine) with similar cluster settings. Elasticsearch makes the shards available for you.

If you start a new instance **in same machine** pointing to same data directory & clustername you are done (also depends on other cluster configurations).

Elasticsearch maintains its storage in below structure (by default) for any new instance started  
clustername/nodes/0/indices/indexname/SHARDS

if you start one more instances  
clustername/nodes/0/indices/indexname/SHARDS  
clustername/nodes/1/indices/indexname/SHARDS (moves some from node0 .. if you dont have any copy setup)

Pounraj Manikandan

---

<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:54am UTC](https://discuss.elastic.co/t/elasticsearch-cluster/10499/9 "2017-07-06T02:54:39Z")

</div>


