# Clarification on Recovery settings please

**URL:** <https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435>\
**Category:** Elasticsearch\
**Created:** [June 26, 2015, 2:51pm UTC](https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435 "2015-06-26T14:51:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Neal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_neal/32/3527_2.png) [@Chris\_Neal](https://discuss.elastic.co/u/Chris_Neal)\
**Post date:** [June 26, 2015, 2:51pm UTC](https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435/1 "2015-06-26T14:51:19Z")

</div>

Hi all,

I would like some clarification on the various cluster recovery settings, just to make sure I'm understanding them correctly.

I have a 6 node cluster, split like this:  
3 master only  
2 data only  
1 client only

Currently, I have these settings:

```
gateway:
  expected_nodes: 6
  recover_after_data_nodes: 1
  recover_after_master_nodes: 1

```

What I'm not sure about is if the recover\_after\_data\_nodes and recover\_after\_master\_nodes are correct. What I think I'm telling ES is that the cluster has 6 nodes, but it's ok to begin recovery after either 1 master or 1 data node are up.

Is this appropriate? Or _should_ I wait to recover until, say, all masters are up? Or all data nodes are up? It wasn't clear to me in the documentation if one was preferable over the other!

Many thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 26, 2015, 11:16pm UTC](https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435/2 "2015-06-26T23:16:20Z")

</div>

This page should give you a bit more guidance - [https://www.elastic.co/guide/en/elasticsearch/guide/current/\_important\_configuration\_changes.html#\_recovery\_settings](https://www.elastic.co/guide/en/elasticsearch/guide/current/_important_configuration_changes.html#_recovery_settings)

Let us know if you have more questions though 🙂

---

<div class="post-metadata">

**Author:** ![Chris\_Neal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_neal/32/3527_2.png) [@Chris\_Neal](https://discuss.elastic.co/u/Chris_Neal)\
**Post date:** [June 29, 2015, 4:42pm UTC](https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435/3 "2015-06-29T16:42:22Z")

</div>

Thank you again Mark 😄

That did make it more clear. To summarize, I could provide (for a 10 node cluster of 1 client only, 3 master only, and 6 data only, with 6 shards and 1 replica for indexing strategy):

```
gateway.recover_after_nodes: 6

```

To say "Don't start a recovery until at least 6 data and/or master nodes are in the cluster."  
Then, for more fine-grained control of the _types_ of nodes you want present in the cluster, you can also provide:

```
gateway.recover_after_data_nodes: 5
gateway.recover_after_master_nodes: 1

```

But does that say "Those 6 nodes must be made up of 1 master and 5 data nodes."  
Or, "When _either_ 1 master node _or_ 5 data nodes are present in the cluster, start a recovery."

I think what I would like to say is, "Start a recovery when you have a master, and you have 5 of the 6 data nodes online."

Is that possible, or necessary? I just didn't want the cluster to see 1 master, thereby satisfying that condition, and start a recovery if there were not enough data nodes online to prevent an unnecessary shuffling of shards!

Thanks again for the assistance.  
Chris

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 29, 2015, 9:23pm UTC](https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435/4 "2015-06-29T21:23:05Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html#recover-after](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html#recover-after) explains that.

It'll wait for that number of master and data nodes, though you really want to use one or the other.

---

<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:04am UTC](https://discuss.elastic.co/t/clarification-on-recovery-settings-please/24435/5 "2017-07-06T00:04:42Z")

</div>


