# Old shards on re-joining nodes useful?

**URL:** <https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266>\
**Category:** Elasticsearch\
**Created:** [June 23, 2014, 5:26pm UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266 "2014-06-23T17:26:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yongtao\_You](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@Yongtao\_You](https://discuss.elastic.co/u/Yongtao_You)\
**Post date:** [June 23, 2014, 5:26pm UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266/1 "2014-06-23T17:26:40Z")

</div>

Hi,

Quick question, please. If a node re-joins the cluster after it got  
rebooted a few minutes ago, will ES make use of the old shards on this node  
under any circumstances? Are they ever going to be used? For example, if a  
shard does not exist anywhere else other than an old copy on this node,  
will it be used?

Thanks.  
Yongtao

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 23, 2014, 7:02pm UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266/2 "2014-06-23T19:02:43Z")

</div>

Yes, if the recovery of an index succeeds, the shards of the rejoined node  
for the index will be used. Do you mean orphaned shards, where the index  
does no longer exist?

Jörg

On Mon, Jun 23, 2014 at 7:26 PM, Yongtao You [yongtao.you@gmail.com](mailto:yongtao.you@gmail.com) wrote:

> Hi,
> 
> Quick question, please. If a node re-joins the cluster after it got  
> rebooted a few minutes ago, will ES make use of the old shards on this node  
> under any circumstances? Are they ever going to be used? For example, if a  
> shard does not exist anywhere else other than an old copy on this node,  
> will it be used?
> 
> Thanks.  
> Yongtao
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFDj9%2BSSP8T7wirOJA\_hLyp5eNJvtc23VkXSTL-P3592Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFDj9%2BSSP8T7wirOJA_hLyp5eNJvtc23VkXSTL-P3592Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Yongtao\_You](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@Yongtao\_You](https://discuss.elastic.co/u/Yongtao_You)\
**Post date:** [June 23, 2014, 7:18pm UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266/3 "2014-06-23T19:18:59Z")

</div>

So upon rebooting of a node, I should NOT attempt to remove all the  
existing ES data before re-joining the cluster because these data might be  
useful?

Yes, I meant orphaned shards.

Thanks.  
Yongtao

On Monday, June 23, 2014 12:02:53 PM UTC-7, Jörg Prante wrote:

> Yes, if the recovery of an index succeeds, the shards of the rejoined node  
> for the index will be used. Do you mean orphaned shards, where the index  
> does no longer exist?
> 
> Jörg
> 
> On Mon, Jun 23, 2014 at 7:26 PM, Yongtao You \<[yongt...@gmail.com](mailto:yongt...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hi,
> > 
> > Quick question, please. If a node re-joins the cluster after it got  
> > rebooted a few minutes ago, will ES make use of the old shards on this node  
> > under any circumstances? Are they ever going to be used? For example, if a  
> > shard does not exist anywhere else other than an old copy on this node,  
> > will it be used?
> > 
> > Thanks.  
> > Yongtao
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 23, 2014, 7:59pm UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266/4 "2014-06-23T19:59:07Z")

</div>

No, you must not remove any data. There are several options what ES can do  
with orphaned shards:

> **[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.

Example of a log entry when orphaned shard is detected:

[2014-06-23 21:46:05,841][INFO][gateway.local.state.meta] [Lonnie  
Thompson Lincoln] [test] dangling index, exists on local file system, but  
not in cluster metadata, scheduling to delete in [2h], auto import to  
cluster state [YES]

You can test this very easily by starting two nodes, index two docs, stop  
one node, delete the index, and start the stopped node again.

Jörg

On Mon, Jun 23, 2014 at 9:18 PM, Yongtao You [yongtao.you@gmail.com](mailto:yongtao.you@gmail.com) wrote:

> So upon rebooting of a node, I should NOT attempt to remove all the  
> existing ES data before re-joining the cluster because these data might be  
> useful?
> 
> Yes, I meant orphaned shards.
> 
> Thanks.  
> Yongtao
> 
> On Monday, June 23, 2014 12:02:53 PM UTC-7, Jörg Prante wrote:
> 
> > Yes, if the recovery of an index succeeds, the shards of the rejoined  
> > node for the index will be used. Do you mean orphaned shards, where the  
> > index does no longer exist?
> > 
> > Jörg
> > 
> > On Mon, Jun 23, 2014 at 7:26 PM, Yongtao You [yongt...@gmail.com](mailto:yongt...@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > Quick question, please. If a node re-joins the cluster after it got  
> > > rebooted a few minutes ago, will ES make use of the old shards on this node  
> > > under any circumstances? Are they ever going to be used? For example, if a  
> > > shard does not exist anywhere else other than an old copy on this node,  
> > > will it be used?
> > > 
> > > Thanks.  
> > > Yongtao
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH3fL9K3C3w4ajLcXEymatXwFpWOGhB79aMMuj5OCPi%2BQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH3fL9K3C3w4ajLcXEymatXwFpWOGhB79aMMuj5OCPi%2BQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Yongtao\_You](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@Yongtao\_You](https://discuss.elastic.co/u/Yongtao_You)\
**Post date:** [June 23, 2014, 8:52pm UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266/5 "2014-06-23T20:52:08Z")

</div>

Thank you, Jörg.

On Monday, June 23, 2014 12:59:12 PM UTC-7, Jörg Prante wrote:

> No, you must not remove any data. There are several options what ES can do  
> with orphaned shards:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-gateway-local.html)
> 
> Example of a log entry when orphaned shard is detected:
> 
> [2014-06-23 21:46:05,841][INFO][gateway.local.state.meta] [Lonnie  
> Thompson Lincoln] [test] dangling index, exists on local file system, but  
> not in cluster metadata, scheduling to delete in [2h], auto import to  
> cluster state [YES]
> 
> You can test this very easily by starting two nodes, index two docs, stop  
> one node, delete the index, and start the stopped node again.
> 
> Jörg
> 
> On Mon, Jun 23, 2014 at 9:18 PM, Yongtao You \<[yongt...@gmail.com](mailto:yongt...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > So upon rebooting of a node, I should NOT attempt to remove all the  
> > existing ES data before re-joining the cluster because these data might be  
> > useful?
> > 
> > Yes, I meant orphaned shards.
> > 
> > Thanks.  
> > Yongtao
> > 
> > On Monday, June 23, 2014 12:02:53 PM UTC-7, Jörg Prante wrote:
> > 
> > > Yes, if the recovery of an index succeeds, the shards of the rejoined  
> > > node for the index will be used. Do you mean orphaned shards, where the  
> > > index does no longer exist?
> > > 
> > > Jörg
> > > 
> > > On Mon, Jun 23, 2014 at 7:26 PM, Yongtao You [yongt...@gmail.com](mailto:yongt...@gmail.com) wrote:
> > > 
> > > > Hi,
> > > > 
> > > > Quick question, please. If a node re-joins the cluster after it got  
> > > > rebooted a few minutes ago, will ES make use of the old shards on this node  
> > > > under any circumstances? Are they ever going to be used? For example, if a  
> > > > shard does not exist anywhere else other than an old copy on this node,  
> > > > will it be used?
> > > > 
> > > > Thanks.  
> > > > Yongtao
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > 
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/88ac2fc3-ff72-4895-86cf-bbeb66937b3f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/292f400c-90eb-4e51-9348-7152832d5331%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/16091ec8-b53a-492d-972c-d61ab381aa4e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/16091ec8-b53a-492d-972c-d61ab381aa4e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:20am UTC](https://discuss.elastic.co/t/old-shards-on-re-joining-nodes-useful/18266/6 "2017-07-06T01:20:26Z")

</div>


