# Correct way to restart a cluster?

**URL:** <https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436>\
**Category:** Elasticsearch\
**Created:** [September 22, 2011, 4:30pm UTC](https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436 "2011-09-22T16:30:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phobos182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phobos182/32/3011_2.png) [@phobos182](https://discuss.elastic.co/u/phobos182)\
**Post date:** [September 22, 2011, 4:30pm UTC](https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436/1 "2011-09-22T16:30:23Z")

</div>

ElasticSearch is re-copying all of the shards it's a replica of on restart. Meaning that if I have a 10 node cluster, and I restart one node, the node will copy over all of the data since the last restart. Even though the restart lasted about 10 seconds.

Does ElasticSearch have any way to detect missing files, and just copy them over instead of the entire index? How would I restart a node without re-copying terabytes worth of information?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 23, 2011, 2:04pm UTC](https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436/2 "2011-09-23T14:04:59Z")

</div>

There isn't a simple way to restart a node without causing it to start  
migrating shards.

But, using the new cluster level update settings API, we can allow for that.  
Basically, we can have a setting that suspends allocations, you can set it  
using the cluster level update settings API, and then, once the restart is  
done, enable it... .

I opened an issue:  
[Allow to disable shard allocations · Issue #1358 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1358). There is already  
an issue open to allow for less distributive node restart action.

-shay.banon

On Thu, Sep 22, 2011 at 7:30 PM, phobos182 [phobos182@gmail.com](mailto:phobos182@gmail.com) wrote:

> Elasticsearch is re-copying all of the shards it's a replica of on restart.  
> Meaning that if I have a 10 node cluster, and I restart one node, the node  
> will copy over all of the data since the last restart. Even though the  
> restart lasted about 10 seconds.
> 
> Does Elasticsearch have any way to detect missing files, and just copy them  
> over instead of the entire index? How would I restart a node without  
> re-copying terabytes worth of information?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Correct-way-to-restart-a-cluster-tp3359340p3359340.html](http://elasticsearch-users.115913.n3.nabble.com/Correct-way-to-restart-a-cluster-tp3359340p3359340.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![phobos182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phobos182/32/3011_2.png) [@phobos182](https://discuss.elastic.co/u/phobos182)\
**Post date:** [September 26, 2011, 1:02pm UTC](https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436/3 "2011-09-26T13:02:20Z")

</div>

Thanks. I just saw that you pushed the change. Thanks for that! At least I know that I will not cause needless network traffic for rolling restarts.

I have one simple question regarding shard replica transfer. I know that with Solr a slave checks all segment files in the directory and only copies segments that it does not have, or newly merged segments. Basically a 'rsync' so it's as efficient as possible.

Does ElasticSearch has any of this type of logic when copying shards to replicas? I ask because we have on order of 40TB of indexes w/replicas that is constantly being updated in real time. I do need to perform rolling restarts for upgrades to cluster members.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 26, 2011, 5:16pm UTC](https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436/4 "2011-09-26T17:16:49Z")

</div>

Yes, elasticsearch will reuse same index files if possible when it does  
allocation of replicas. Note, replication is done quite differently though,  
see more about it in this session:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

.

On Mon, Sep 26, 2011 at 4:02 PM, phobos182 [phobos182@gmail.com](mailto:phobos182@gmail.com) wrote:

> Thanks. I just saw that you pushed the change. Thanks for that! At least I  
> know that I will not cause needless network traffic for rolling restarts.
> 
> I have one simple question regarding shard replica transfer. I know that  
> with Solr a slave checks all segment files in the directory and only copies  
> segments that it does not have, or newly merged segments. Basically a  
> 'rsync' so it's as efficient as possible.
> 
> Does Elasticsearch has any of this type of logic when copying shards to  
> replicas? I ask because we have on order of 40TB of indexes w/replicas that  
> is constantly being updated in real time. I do need to perform rolling  
> restarts for upgrades to cluster members.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Correct-way-to-restart-a-cluster-tp3359340p3369170.html](http://elasticsearch-users.115913.n3.nabble.com/Correct-way-to-restart-a-cluster-tp3359340p3369170.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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, 3:53am UTC](https://discuss.elastic.co/t/correct-way-to-restart-a-cluster/5436/5 "2017-07-06T03:53:34Z")

</div>


