# Replicated shard doesn't rebuild

**URL:** https://discuss.elastic.co/t/replicated-shard-doesnt-rebuild/9185
**Category:** Elasticsearch
**Created:** [September 28, 2012, 8:17am UTC](https://discuss.elastic.co/t/replicated-shard-doesnt-rebuild/9185 "2012-09-28T08:17:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JCD](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@JCD](https://discuss.elastic.co/u/JCD)
#### Post date: [September 28, 2012, 8:17am UTC](https://discuss.elastic.co/t/replicated-shard-doesnt-rebuild/9185/1 "2012-09-28T08:17:11Z")

</div>

Hello everyone,

I'm a real newbie on elastic search.  
I played a little with logstash, elasticsearch (with head plugin) and  
kibana with two replicated nodes and 1 index splitted into 5 shards on the  
2 nodes.

I do my test like a real nag on .deb 0.19.9 version on a debian.

I try to verify if my replication is working fine.

So I create my first node.  
I set datas on it and i can see  
/var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash having folders  
0 to 4 created.

I create my second node, subscribe to index "stash". Then I can see it also  
create and replicate my shards in  
/var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash

If I wildly erase a shard with "rm -rf  
/var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash/1", for  
example, my cluster status remains green, and this shard is never  
replicated again until I restart the elasticsearch service.  
Is it normal ? What can I do to check the replication status or force it to  
"rebuild" ?

My test should appear to be wild but isn't it what it should happens with a  
corrupted hard drive or raid volume in the real life ?

Thank you,

JCD.

--

---

<div class="post-metadata">

### Author: ![JCD](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@JCD](https://discuss.elastic.co/u/JCD)
#### Post date: [September 28, 2012, 8:22am UTC](https://discuss.elastic.co/t/replicated-shard-doesnt-rebuild/9185/2 "2012-09-28T08:22:42Z")

</div>

It seems I didn't wait enough...

After a while, I get this error on my logs :

"[2012-09-28 10:11:41,774][WARN][index.engine.robin] [logstash2]  
[stash][1] failed to read latest segment infos on flush  
java.io.FileNotFoundException:  
/var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash/1/index/segments\_80  
(No such file or directory)  
"  
....

Then  
[2012-09-28 10:13:07,130][WARN][index.engine.robin] [logstash2]  
[stash][1] failed to read latest segment infos on flush  
org.apache.lucene.index.IndexNotFoundException: no segments\* file found in  
org.elasticsearch.index.store.Store$StoreDirectory@373ee92  
lockFactory=org.apache.lucene.store.NativeFSLockFactory@7ee361ad: files:  
[\_checksums-1348818101728]  
....

Then my shard folders "1" is replicated again.  
Is there any timeout? What should I monitor ?

Thank you,  
Best regards,  
JCD

On Friday, September 28, 2012 10:17:11 AM UTC+2, JCD wrote:

> Hello everyone,
> 
> I'm a real newbie on Elasticsearch.  
> I played a little with logstash, elasticsearch (with head plugin) and  
> kibana with two replicated nodes and 1 index splitted into 5 shards on the  
> 2 nodes.
> 
> I do my test like a real nag on .deb 0.19.9 version on a debian.
> 
> I try to verify if my replication is working fine.
> 
> So I create my first node.  
> I set datas on it and i can see  
> /var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash having folders  
> 0 to 4 created.
> 
> I create my second node, subscribe to index "stash". Then I can see it  
> also create and replicate my shards in  
> /var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash
> 
> If I wildly erase a shard with "rm -rf  
> /var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash/1", for  
> example, my cluster status remains green, and this shard is never  
> replicated again until I restart the elasticsearch service.  
> Is it normal ? What can I do to check the replication status or force it  
> to "rebuild" ?
> 
> My test should appear to be wild but isn't it what it should happens with  
> a corrupted hard drive or raid volume in the real life ?
> 
> Thank you,
> 
> JCD.

--

---

<div class="post-metadata">

### Author: ![JCD](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@JCD](https://discuss.elastic.co/u/JCD)
#### Post date: [October 1, 2012, 7:26am UTC](https://discuss.elastic.co/t/replicated-shard-doesnt-rebuild/9185/3 "2012-10-01T07:26:59Z")

</div>

Hello,

I can't find how it was been rebuild automatically... then I'm not fully  
confident with it. I know I should work with at least 2 replicas (to get  
such a raid 6 protection).  
What is the action that make shards are rebuilded/rechecked ?

On Friday, September 28, 2012 10:17:11 AM UTC+2, JCD wrote:

> Hello everyone,
> 
> I'm a real newbie on Elasticsearch.  
> I played a little with logstash, elasticsearch (with head plugin) and  
> kibana with two replicated nodes and 1 index splitted into 5 shards on the  
> 2 nodes.
> 
> I do my test like a real nag on .deb 0.19.9 version on a debian.
> 
> I try to verify if my replication is working fine.
> 
> So I create my first node.  
> I set datas on it and i can see  
> /var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash having folders  
> 0 to 4 created.
> 
> I create my second node, subscribe to index "stash". Then I can see it  
> also create and replicate my shards in  
> /var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash
> 
> If I wildly erase a shard with "rm -rf  
> /var/lib/elasticsearch/logstashcluster/nodes/0/indices/stash/1", for  
> example, my cluster status remains green, and this shard is never  
> replicated again until I restart the elasticsearch service.  
> Is it normal ? What can I do to check the replication status or force it  
> to "rebuild" ?
> 
> My test should appear to be wild but isn't it what it should happens with  
> a corrupted hard drive or raid volume in the real life ?
> 
> Thank you,
> 
> JCD.

--

---

<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:10am UTC](https://discuss.elastic.co/t/replicated-shard-doesnt-rebuild/9185/4 "2017-07-06T03:10:39Z")

</div>


