# All primary shards are in same node. Why? Version 1.1.1

**URL:** <https://discuss.elastic.co/t/all-primary-shards-are-in-same-node-why-version-1-1-1/17895>\
**Category:** Elasticsearch\
**Created:** [June 3, 2014, 7:49pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-in-same-node-why-version-1-1-1/17895 "2014-06-03T19:49:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santiago\_Ferrer\_Dehe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santiago_ferrer_dehe/32/1469_2.png) [@Santiago\_Ferrer\_Dehe](https://discuss.elastic.co/u/Santiago_Ferrer_Dehe)\
**Post date:** [June 3, 2014, 7:49pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-in-same-node-why-version-1-1-1/17895/1 "2014-06-03T19:49:45Z")

</div>

Hi everyone!

Im having a doubt regards my elastic cluster. Here is a picture of the head  
plugin....

[https://lh3.googleusercontent.com/-A1xK6Rk6U8w/U44jmdSDLGI/AAAAAAAAAOs/mvq8of-mVvo/s1600/Screen+Shot+2014-06-03+at+14.30.01.png](https://lh3.googleusercontent.com/-A1xK6Rk6U8w/U44jmdSDLGI/AAAAAAAAAOs/mvq8of-mVvo/s1600/Screen+Shot+2014-06-03+at+14.30.01.png)  
Here you can see that all _primary shards are in the same node_ and not  
distributed. I shutdown the master node to see if the primary shards were  
going to be distributed in both nodes left but this is what happened.

[https://lh5.googleusercontent.com/-5KbBNVtm114/U44lCzj7A\_I/AAAAAAAAAO8/wvc2txaoc88/s1600/Screen+Shot+2014-06-03+at+14.35.04.png](https://lh5.googleusercontent.com/-5KbBNVtm114/U44lCzj7A_I/AAAAAAAAAO8/wvc2txaoc88/s1600/Screen+Shot+2014-06-03+at+14.35.04.png)

_All primary shards were allocated in a single node_. Is this behaviour  
right? I would prefer them to be distributed equally among all nodes so the  
writing operations are not handled by a single one. Know how to do that?

This is my elasticsearch.yml

_##################### ElasticSearch Configuration Example  
#####################_

_# Cluster name identifies your cluster for auto-discovery. If you're  
running_  
_# multiple clusters on the same network, make sure you're using unique  
names._  
_#_  
_cluster.name: mclics_

_action.auto\_create\_index: false_

_index.number\_of\_shards: 16_

_index.number\_of\_replicas: 2_

_action.disable\_delete\_all\_indices: true_

_path.data: /mnt/elasticsearch_

_path.logs: /usr/local/log_

_bootstrap.mlockall: true_

_gateway.recover\_after\_nodes: 2_

_gateway.expected\_nodes: 3_

_discovery.zen.minimum\_master\_nodes: 1_

_discovery.zen.ping.unicast.hosts: [##hosts##]_

Thanks,  
Santiago!

--  
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/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 3, 2014, 7:53pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-in-same-node-why-version-1-1-1/17895/2 "2014-06-03T19:53:11Z")

</div>

Primary shards are addressed first when writing, but it is a myth they do  
all the writing. Secondary shards do the writing too, but only some milli  
seconds later. There is nothing to worry about.

Jörg

On Tue, Jun 3, 2014 at 9:49 PM, Santiago Ferrer Deheza \<  
[sa.ferrer.deheza@gmail.com](mailto:sa.ferrer.deheza@gmail.com)\> wrote:

> Hi everyone!
> 
> Im having a doubt regards my elastic cluster. Here is a picture of the  
> head plugin....
> 
> [https://lh3.googleusercontent.com/-A1xK6Rk6U8w/U44jmdSDLGI/AAAAAAAAAOs/mvq8of-mVvo/s1600/Screen+Shot+2014-06-03+at+14.30.01.png](https://lh3.googleusercontent.com/-A1xK6Rk6U8w/U44jmdSDLGI/AAAAAAAAAOs/mvq8of-mVvo/s1600/Screen+Shot+2014-06-03+at+14.30.01.png)  
> Here you can see that all _primary shards are in the same node_ and not  
> distributed. I shutdown the master node to see if the primary shards were  
> going to be distributed in both nodes left but this is what happened.
> 
> [https://lh5.googleusercontent.com/-5KbBNVtm114/U44lCzj7A\_I/AAAAAAAAAO8/wvc2txaoc88/s1600/Screen+Shot+2014-06-03+at+14.35.04.png](https://lh5.googleusercontent.com/-5KbBNVtm114/U44lCzj7A_I/AAAAAAAAAO8/wvc2txaoc88/s1600/Screen+Shot+2014-06-03+at+14.35.04.png)
> 
> _All primary shards were allocated in a single node_. Is this behaviour  
> right? I would prefer them to be distributed equally among all nodes so the  
> writing operations are not handled by a single one. Know how to do that?
> 
> This is my elasticsearch.yml
> 
> _##################### Elasticsearch Configuration Example  
> #####################_
> 
> _# Cluster name identifies your cluster for auto-discovery. If you're  
> running_  
> _# multiple clusters on the same network, make sure you're using unique  
> names._  
> _#_  
> _cluster.name [http://cluster.name](http://cluster.name): mclics_
> 
> _action.auto\_create\_index: false_
> 
> _index.number\_of\_shards: 16_
> 
> _index.number\_of\_replicas: 2_
> 
> _action.disable\_delete\_all\_indices: true_
> 
> _path.data: /mnt/elasticsearch_
> 
> _path.logs: /usr/local/log_
> 
> _bootstrap.mlockall: true_
> 
> _gateway.recover\_after\_nodes: 2_
> 
> _gateway.expected\_nodes: 3_
> 
> _discovery.zen.minimum\_master\_nodes: 1_
> 
> _discovery.zen.ping.unicast.hosts: [##hosts##]_
> 
> Thanks,  
> Santiago!
> 
> --  
> 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/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%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/CAKdsXoGAWMbxKMHQnVOwtq-1jnSu9p2D\_rUD8LhydeyJuQjLXA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGAWMbxKMHQnVOwtq-1jnSu9p2D_rUD8LhydeyJuQjLXA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Santiago\_Ferrer\_Dehe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santiago_ferrer_dehe/32/1469_2.png) [@Santiago\_Ferrer\_Dehe](https://discuss.elastic.co/u/Santiago_Ferrer_Dehe)\
**Post date:** [June 3, 2014, 8:22pm UTC](https://discuss.elastic.co/t/all-primary-shards-are-in-same-node-why-version-1-1-1/17895/3 "2014-06-03T20:22:49Z")

</div>

Jörg, Thanks for the quick answer!

On Tuesday, June 3, 2014 4:53:16 PM UTC-3, Jörg Prante wrote:

> Primary shards are addressed first when writing, but it is a myth they do  
> all the writing. Secondary shards do the writing too, but only some milli  
> seconds later. There is nothing to worry about.
> 
> Jörg
> 
> On Tue, Jun 3, 2014 at 9:49 PM, Santiago Ferrer Deheza \<  
> [sa.ferre...@gmail.com](mailto:sa.ferre...@gmail.com) \<javascript:\>\> wrote:
> 
> > Hi everyone!
> > 
> > Im having a doubt regards my elastic cluster. Here is a picture of the  
> > head plugin....
> > 
> > [https://lh3.googleusercontent.com/-A1xK6Rk6U8w/U44jmdSDLGI/AAAAAAAAAOs/mvq8of-mVvo/s1600/Screen+Shot+2014-06-03+at+14.30.01.png](https://lh3.googleusercontent.com/-A1xK6Rk6U8w/U44jmdSDLGI/AAAAAAAAAOs/mvq8of-mVvo/s1600/Screen+Shot+2014-06-03+at+14.30.01.png)  
> > Here you can see that all _primary shards are in the same node_ and not  
> > distributed. I shutdown the master node to see if the primary shards were  
> > going to be distributed in both nodes left but this is what happened.
> > 
> > [https://lh5.googleusercontent.com/-5KbBNVtm114/U44lCzj7A\_I/AAAAAAAAAO8/wvc2txaoc88/s1600/Screen+Shot+2014-06-03+at+14.35.04.png](https://lh5.googleusercontent.com/-5KbBNVtm114/U44lCzj7A_I/AAAAAAAAAO8/wvc2txaoc88/s1600/Screen+Shot+2014-06-03+at+14.35.04.png)
> > 
> > _All primary shards were allocated in a single node_. Is this behaviour  
> > right? I would prefer them to be distributed equally among all nodes so the  
> > writing operations are not handled by a single one. Know how to do that?
> > 
> > This is my elasticsearch.yml
> > 
> > _##################### Elasticsearch Configuration Example  
> > #####################_
> > 
> > _# Cluster name identifies your cluster for auto-discovery. If you're  
> > running_  
> > _# multiple clusters on the same network, make sure you're using unique  
> > names._  
> > _#_  
> > _cluster.name [http://cluster.name](http://cluster.name): mclics_
> > 
> > _action.auto\_create\_index: false_
> > 
> > _index.number\_of\_shards: 16_
> > 
> > _index.number\_of\_replicas: 2_
> > 
> > _action.disable\_delete\_all\_indices: true_
> > 
> > _path.data: /mnt/elasticsearch_
> > 
> > _path.logs: /usr/local/log_
> > 
> > _bootstrap.mlockall: true_
> > 
> > _gateway.recover\_after\_nodes: 2_
> > 
> > _gateway.expected\_nodes: 3_
> > 
> > _discovery.zen.minimum\_master\_nodes: 1_
> > 
> > _discovery.zen.ping.unicast.hosts: [##hosts##]_
> > 
> > Thanks,  
> > Santiago!
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/93af689a-e14d-4047-95be-7f32ed730a1e%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/29833671-7b72-423c-9b21-1a42a0e72e97%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/29833671-7b72-423c-9b21-1a42a0e72e97%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:24am UTC](https://discuss.elastic.co/t/all-primary-shards-are-in-same-node-why-version-1-1-1/17895/4 "2017-07-06T01:24:52Z")

</div>


