# How do i find out "stale primary" quickly

**URL:** https://discuss.elastic.co/t/how-do-i-find-out-stale-primary-quickly/237049
**Category:** Elasticsearch
**Created:** [June 15, 2020, 3:09am UTC](https://discuss.elastic.co/t/how-do-i-find-out-stale-primary-quickly/237049 "2020-06-15T03:09:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yc1024](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yc1024/32/42644_2.png) [@yc1024](https://discuss.elastic.co/u/yc1024)
#### Post date: [June 15, 2020, 3:09am UTC](https://discuss.elastic.co/t/how-do-i-find-out-stale-primary-quickly/237049/1 "2020-06-15T03:09:43Z")

</div>

There are 50,000 shards and 70 nodes in my cluster.I have two nodes with hardware failure，I want to use allocate\_stale\_primary for recovery. How can I quickly find out the "stale primary".

```auto
curl -X POST "http://localhost:9200/_cluster/reroute?pretty" -H 'Content-Type: application/json' -d'
{
    "commands" : [
        {
          "allocate_stale_primary" : {
                "index" : "myindex", 
                "shard" : 9,
                "node" : "",
                "accept_data_loss":true
          }
        }
    ]
}
'

```

---

<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 13, 2020, 3:22am UTC](https://discuss.elastic.co/t/how-do-i-find-out-stale-primary-quickly/237049/2 "2020-07-13T03:22:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
