# Dangling index, exists on local file system, but not in cluster metadata, scheduling to delete

**URL:** <https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975>\
**Category:** Elasticsearch\
**Created:** [June 5, 2012, 6:46am UTC](https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975 "2012-06-05T06:46:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dong\_Aihua](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dong_aihua/32/2413_2.png) [@Dong\_Aihua](https://discuss.elastic.co/u/Dong_Aihua)\
**Post date:** [June 5, 2012, 6:46am UTC](https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975/1 "2012-06-05T06:46:00Z")

</div>

Hi,  
My index is missing. How can I find it back?  
Firstly, I created an index on one node(2 shards, no replica). Then  
shutdown the node, and add another node into the cluster. And change the  
configure to 2 shards+ 1 replica.  
After the both nodes comes up, the previous index is missing.  
From the log, it reported: dangling index, exists on local file system,  
but not in cluster metadata, scheduling to delete  
How can I recover my index?  
Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 5, 2012, 6:59am UTC](https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975/2 "2012-06-05T06:59:15Z")

</div>

You mean that you :

1. start a node (node1)
2. create an index
3. stop the node
4. start a new node (node2)
5. send a request to "modify" the index

If you have done this, your index in node1 does not exist anymore.

Because you start a new Node (node2) without having node1 running. So Node1 can  
not talk with node2 to replicate its metadata and data.

So, Node2 is considering itself as a master of your cluster.  
When you ask to "modify" index, in fact, Node2 doesn't know that this index  
should already exists and create a new index with 2 shards and 1 replica.

When Node1 wake up again, it gets an information from the master (Node2) that  
the real version of your index is the one Node2 knows...

So, don't add a new node to your cluster when all the other nodes of this  
cluster are down.

My 2 cents  
David.

Le 5 juin 2012 à 08:46, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) a écrit :

> Hi,  
> My index is missing. How can I find it back?  
> Firstly, I created an index on one node(2 shards, no replica). Then  
> shutdown the node, and add another node into the cluster. And change the  
> configure to 2 shards+ 1 replica.  
> After the both nodes comes up, the previous index is missing.  
> From the log, it reported: dangling index, exists on local file system,  
> but not in cluster metadata, scheduling to delete  
> How can I recover my index?  
> Thanks.

--  
David Pilato  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Dong\_Aihua](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dong_aihua/32/2413_2.png) [@Dong\_Aihua](https://discuss.elastic.co/u/Dong_Aihua)\
**Post date:** [June 5, 2012, 8:32am UTC](https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975/3 "2012-06-05T08:32:39Z")

</div>

I mean:

1. start a node1
2. create an index and insert some datas
3. stop the node1
4. modify the configure to let node1 and node2 in the same cluster and both  
set replica to 1
5. start the node1 and node2 at the same time
6. after the node1 and node2 starts, check the ES head, no index data is  
shown.  
But I checked the node1's data directory. My index data is still there.

How can I bring back my index data? Or will my index lose totally?  
Thanks.

-Regards-  
-Jackie-

在 2012年6月5日星期二UTC+8下午2时59分15秒，David Pilato写道：

> You mean that you :
> 
> 1. start a node (node1)
> 
> 2. create an index
> 
> 3. stop the node
> 
> 4. start a new node (node2)
> 
> 5. send a request to "modify" the index
> 
> If you have done this, your index in node1 does not exist anymore.
> 
> Because you start a new Node (node2) without having node1 running. So  
> Node1 can not talk with node2 to replicate its metadata and data.
> 
> So, Node2 is considering itself as a master of your cluster.
> 
> When you ask to "modify" index, in fact, Node2 doesn't know that this  
> index should already exists and create a new index with 2 shards and 1  
> replica.
> 
> When Node1 wake up again, it gets an information from the master (Node2)  
> that the real version of your index is the one Node2 knows...
> 
> So, don't add a new node to your cluster when all the other nodes of this  
> cluster are down.
> 
> My 2 cents
> 
> David.
> 
> Le 5 juin 2012 à 08:46, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) a écrit :
> 
> Hi,  
> My index is missing. How can I find it back?  
> Firstly, I created an index on one node(2 shards, no replica). Then  
> shutdown the node, and add another node into the cluster. And change the  
> configure to 2 shards+ 1 replica.  
> After the both nodes comes up, the previous index is missing.  
> From the log, it reported: dangling index, exists on local file  
> system, but not in cluster metadata, scheduling to delete  
> How can I recover my index?  
> Thanks.
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<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:** [June 8, 2012, 10:21pm UTC](https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975/4 "2012-06-08T22:21:05Z")

</div>

I still don't understand the process..., you create an index with no  
replicas on 2 nodes, then stop node1, and then bring it back?

On Tue, Jun 5, 2012 at 10:32 AM, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) wrote:

> I mean:
> 
> 1. start a node1
> 2. create an index and insert some datas
> 3. stop the node1
> 4. modify the configure to let node1 and node2 in the same cluster and  
> both set replica to 1
> 5. start the node1 and node2 at the same time
> 6. after the node1 and node2 starts, check the ES head, no index data is  
> shown.  
> But I checked the node1's data directory. My index data is still there.
> 
> How can I bring back my index data? Or will my index lose totally?  
> Thanks.
> 
> -Regards-  
> -Jackie-
> 
> 在 2012年6月5日星期二UTC+8下午2时59分15秒，David Pilato写道：
> 
> > You mean that you :
> > 
> > 1. start a node (node1)
> > 
> > 2. create an index
> > 
> > 3. stop the node
> > 
> > 4. start a new node (node2)
> > 
> > 5. send a request to "modify" the index
> > 
> > If you have done this, your index in node1 does not exist anymore.
> > 
> > Because you start a new Node (node2) without having node1 running. So  
> > Node1 can not talk with node2 to replicate its metadata and data.
> > 
> > So, Node2 is considering itself as a master of your cluster.
> > 
> > When you ask to "modify" index, in fact, Node2 doesn't know that this  
> > index should already exists and create a new index with 2 shards and 1  
> > replica.
> > 
> > When Node1 wake up again, it gets an information from the master (Node2)  
> > that the real version of your index is the one Node2 knows...
> > 
> > So, don't add a new node to your cluster when all the other nodes of this  
> > cluster are down.
> > 
> > My 2 cents
> > 
> > David.
> > 
> > Le 5 juin 2012 à 08:46, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) a écrit :
> > 
> > Hi,  
> > My index is missing. How can I find it back?  
> > Firstly, I created an index on one node(2 shards, no replica). Then  
> > shutdown the node, and add another node into the cluster. And change the  
> > configure to 2 shards+ 1 replica.  
> > After the both nodes comes up, the previous index is missing.  
> > From the log, it reported: dangling index, exists on local file  
> > system, but not in cluster metadata, scheduling to delete  
> > How can I recover my index?  
> > Thanks.
> > 
> > --  
> > David Pilato  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Munna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munna/32/1841_2.png) [@Munna](https://discuss.elastic.co/u/Munna)\
**Post date:** [April 8, 2013, 3:28pm UTC](https://discuss.elastic.co/t/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975/5 "2013-04-08T15:28:07Z")

</div>

I think what he did is,

- on node1 he created an index "X".
- stopped node1
- configured node1 and node2 to be in the same cluster and index.number\_of\_replicas of each index to 1.
- start node1 and node2 at the same time.

I think when he indexed "X", he didn't set up index.number\_of\_replicas yet. So, the index will only reside in node1 after starting both nodes at the same time. If he apply the update settings on index "X" using API after starting the nodes, "X" will get replicated to the other node.

Cheers  
Lollypop

---

<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/dangling-index-exists-on-local-file-system-but-not-in-cluster-metadata-scheduling-to-delete/7975/6 "2017-07-06T02:42:15Z")

</div>


