# Primary Shard allocation in the same node has same storage information

**URL:** <https://discuss.elastic.co/t/primary-shard-allocation-in-the-same-node-has-same-storage-information/52902>\
**Category:** Elasticsearch\
**Created:** [June 15, 2016, 5:51pm UTC](https://discuss.elastic.co/t/primary-shard-allocation-in-the-same-node-has-same-storage-information/52902 "2016-06-15T17:51:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newelasticuser](https://avatars.discourse-cdn.com/v4/letter/n/50afbb/32.png) [@newelasticuser](https://discuss.elastic.co/u/newelasticuser)\
**Post date:** [June 15, 2016, 5:51pm UTC](https://discuss.elastic.co/t/primary-shard-allocation-in-the-same-node-has-same-storage-information/52902/1 "2016-06-15T17:51:41Z")

</div>

Have 3 node Elasticsearch cluster (version 2.3). Have the following configuration

Master dedicated : 1 (kibana, Marvel installed on this node)  
Master with data : 2  
Shards:5  
Replicas: 1

Would like to know if the following shard allocation is valid? The cluster say around 80.7m documents available.  
Does this mean the shards are duplicated on node3 on all 5 primary shards?This seems to accomodate more space as all shards storage space says 3.6gb.  
Please explain if this is valid?  
Is there any settings to be done to avoid duplication of same documents within the same node?

index shard prirep state docs store node  
.kibana 0 p STARTED 3 23.5kb node3  
.marvel-es-data-1 0 p STARTED 23 10kb node2  
.marvel-es-1-2016.06.15 0 p STARTED 84616 32.6mb node3  
myindex 2 r STARTED 8070555 3.6gb node2  
myindex 2 p STARTED 8070555 3.6gb node3  
myindex 3 r STARTED 8067454 3.6gb node2  
myindex 3 p STARTED 8067454 3.7gb node3  
myindex 4 r STARTED 8070424 3.6gb node2  
myindex 4 p STARTED 8070424 3.6gb node3  
myindex 1 r STARTED 8070873 3.6gb node2  
myindex 1 p STARTED 8070873 3.6gb node3  
myindex 0 r STARTED 8070694 3.6gb node2  
myindex 0 p STARTED 8070694 3.6gb node3

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2016, 7:52am UTC](https://discuss.elastic.co/t/primary-shard-allocation-in-the-same-node-has-same-storage-information/52902/2 "2016-06-16T07:52:22Z")

</div>

Hey,

I am not sure if I fully get the question, but if you look at the data, there is never the same data on the same node. if you check the settings for `myindex 2` you see that the replica (the `r` in the third column) is on node2, while the primary (the `p`) is on node 3. And this repeats for all shards with the same number.

--Alex

---

<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 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/primary-shard-allocation-in-the-same-node-has-same-storage-information/52902/3 "2017-07-05T22:43:25Z")

</div>


