# Unassigned Primary and Replica Shard

**URL:** https://discuss.elastic.co/t/unassigned-primary-and-replica-shard/23380
**Category:** Elasticsearch
**Created:** [April 23, 2015, 7:12pm UTC](https://discuss.elastic.co/t/unassigned-primary-and-replica-shard/23380 "2015-04-23T19:12:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ariel](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@ariel](https://discuss.elastic.co/u/ariel)
#### Post date: [April 23, 2015, 7:12pm UTC](https://discuss.elastic.co/t/unassigned-primary-and-replica-shard/23380/1 "2015-04-23T19:12:15Z")

</div>

Hello,

I have a 4 machine cluster (2 data nodes and 2 master nodes) and some time  
last night I had a failover from one master to the other. At this time a  
number of things happened:

1. Original master came back up but did not join the cluster
2. Shards for about 5 indexes are unassigned and now report that they  
have 0 documents in this.

Case 2 is much more worrying as I'm loosing data. Does anyone have insight  
of why this happens? How can it be avoided?

--  
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/187c35cc-0472-4403-bc03-23db451e9106%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/187c35cc-0472-4403-bc03-23db451e9106%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, 12:18am UTC](https://discuss.elastic.co/t/unassigned-primary-and-replica-shard/23380/2 "2017-07-06T00:18:01Z")

</div>


