# How to restrict shard auto failover in elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-restrict-shard-auto-failover-in-elasticsearch/10792>\
**Category:** Elasticsearch\
**Created:** [February 19, 2013, 6:41am UTC](https://discuss.elastic.co/t/how-to-restrict-shard-auto-failover-in-elasticsearch/10792 "2013-02-19T06:41:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@Krishna\_Reddy](https://discuss.elastic.co/u/Krishna_Reddy)\
**Post date:** [February 19, 2013, 6:41am UTC](https://discuss.elastic.co/t/how-to-restrict-shard-auto-failover-in-elasticsearch/10792/1 "2013-02-19T06:41:22Z")

</div>

Looking for help with restricting shard auto failover. If we have 1000  
indexes and some times it requires nodes to be restarted. In the event of  
node restarts shards are automatically failed over or getting rebuilt on  
different nodes. This is causing lot of time to build and recover. Instead,  
is there a way disable shard failover and restart the node will bring it  
back shards online immediately.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 19, 2013, 11:49am UTC](https://discuss.elastic.co/t/how-to-restrict-shard-auto-failover-in-elasticsearch/10792/2 "2013-02-19T11:49:45Z")

</div>

If the node restart is planned, you can temporarily disable shard  
allocation with:

cluster.routing.allocation.disable\_allocation or  
cluster.routing.allocation.disable\_replica\_allocation

Check out the cluster shard allocation page[http://www.elasticsearch.org/guide/reference/modules/cluster.html](http://www.elasticsearch.org/guide/reference/modules/cluster.html)for more details. Note that replicas will still be promoted to primaries if  
a primary goes down, and ES will still sync various changes when the node  
comes back up.

-Zach

On Tuesday, February 19, 2013 1:41:22 AM UTC-5, Krishna Reddy wrote:

> Looking for help with restricting shard auto failover. If we have 1000  
> indexes and some times it requires nodes to be restarted. In the event of  
> node restarts shards are automatically failed over or getting rebuilt on  
> different nodes. This is causing lot of time to build and recover. Instead,  
> is there a way disable shard failover and restart the node will bring it  
> back shards online immediately.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Krishna\_Reddy](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@Krishna\_Reddy](https://discuss.elastic.co/u/Krishna_Reddy)\
**Post date:** [April 7, 2013, 6:13am UTC](https://discuss.elastic.co/t/how-to-restrict-shard-auto-failover-in-elasticsearch/10792/3 "2013-04-07T06:13:47Z")

</div>

Thank Zach it was helpful and worked for us.

On Tuesday, February 19, 2013 3:49:45 AM UTC-8, Zachary Tong wrote:

> If the node restart is planned, you can temporarily disable shard  
> allocation with:
> 
> cluster.routing.allocation.disable\_allocation or  
> cluster.routing.allocation.disable\_replica\_allocation
> 
> Check out the cluster shard allocation page[http://www.elasticsearch.org/guide/reference/modules/cluster.html](http://www.elasticsearch.org/guide/reference/modules/cluster.html)for more details. Note that replicas will still be promoted to primaries if  
> a primary goes down, and ES will still sync various changes when the node  
> comes back up.
> 
> -Zach
> 
> On Tuesday, February 19, 2013 1:41:22 AM UTC-5, Krishna Reddy wrote:
> 
> > Looking for help with restricting shard auto failover. If we have 1000  
> > indexes and some times it requires nodes to be restarted. In the event of  
> > node restarts shards are automatically failed over or getting rebuilt on  
> > different nodes. This is causing lot of time to build and recover. Instead,  
> > is there a way disable shard failover and restart the node will bring it  
> > back shards online immediately.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:42am UTC](https://discuss.elastic.co/t/how-to-restrict-shard-auto-failover-in-elasticsearch/10792/4 "2017-07-06T02:42:24Z")

</div>


