# Fundamental question about ES data/shards

**URL:** https://discuss.elastic.co/t/fundamental-question-about-es-data-shards/1489
**Category:** Elasticsearch
**Created:** [May 28, 2015, 3:14pm UTC](https://discuss.elastic.co/t/fundamental-question-about-es-data-shards/1489 "2015-05-28T15:14:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![slee](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@slee](https://discuss.elastic.co/u/slee)
#### Post date: [May 28, 2015, 3:14pm UTC](https://discuss.elastic.co/t/fundamental-question-about-es-data-shards/1489/1 "2015-05-28T15:14:29Z")

</div>

Hello,  
From my understanding, are all the data in ES stored in the shards? And the data is not redundant, so each shard has only a portion of the total data set (not counting replicas)? I ask because we want to replace 2 nodes in our cluster with 2 beefier nodes, and repurpose the 2 older servers. Our plan was to add 1 server to the cluster, allow the data to transfer over, and then add the other 1 since there is a significant amount of data. I wasn't sure the best way to go about this, would it be better to disable shard reallocation? If shard reallocation is disabled, then theoretically no data would get transferred, correct? How do we ensure all the data gets copied over? I did some searching, but I wasn't able to find a way to manually move shards. I suppose we could just copy the physical files over, and have ES recover and pick them up, but I'm not sure if that's the best way to go about it.

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [May 28, 2015, 3:36pm UTC](https://discuss.elastic.co/t/fundamental-question-about-es-data-shards/1489/2 "2015-05-28T15:36:39Z")

</div>

I'd add the other two nodes to the cluster and then use  
cluster.routing.allocation.exclude to remove the shards from the old nodes  
and then shut them down.

On thing to keep in mind is that cluster.routing.allocation.exclude causes  
elasticsearch to push the shards off of the excluded nodes with quite a lot  
of haste. It'll move them to all of the other nodes and _then_ the balancer  
will kick in and start balancing the load. So if you are close to the edge  
on power you may want to just add the new nodes and wait a while for the  
balancer to balance shards to those nodes and _then_ use  
cluster.routing.allocation.exclude to clear the shards off the old nodes.  
That way the nodes will get allocated relatively evenly.

Nik

---

<div class="post-metadata">

### Author: ![slee](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@slee](https://discuss.elastic.co/u/slee)
#### Post date: [May 28, 2015, 3:39pm UTC](https://discuss.elastic.co/t/fundamental-question-about-es-data-shards/1489/3 "2015-05-28T15:39:09Z")

</div>

Thanks for the suggestion Nik. So the cluster.routing.allocation.exclude command will cause the shards to go to any other node? Say we only want join 1 node at the beginning, if we use cluster.routing.allocation.exclude then the shards will get pushed to the new node AND the other old node that's still there? Or, if we do add both nodes and use cluster.routing.allocation.exclude on both old nodes, then there's a possibility that all of the data could get sent to just one node, and then balancing would balance them out across both nodes?

---

<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, 12:11am UTC](https://discuss.elastic.co/t/fundamental-question-about-es-data-shards/1489/4 "2017-07-06T00:11:14Z")

</div>


