# Cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster

**URL:** <https://discuss.elastic.co/t/cannot-allocate-because-a-previous-copy-of-the-primary-shard-existed-but-can-no-longer-be-found-on-the-nodes-in-the-cluster/257148>\
**Category:** Elasticsearch\
**Created:** [December 1, 2020, 4:03am UTC](https://discuss.elastic.co/t/cannot-allocate-because-a-previous-copy-of-the-primary-shard-existed-but-can-no-longer-be-found-on-the-nodes-in-the-cluster/257148 "2020-12-01T04:03:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfeng888](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wfeng888](https://discuss.elastic.co/u/wfeng888)\
**Post date:** [December 1, 2020, 4:03am UTC](https://discuss.elastic.co/t/cannot-allocate-because-a-previous-copy-of-the-primary-shard-existed-but-can-no-longer-be-found-on-the-nodes-in-the-cluster/257148/1 "2020-12-01T04:03:07Z")

</div>

I have a cluster with two nodes , version es5.4.3. About 26 shards unassigned after machine down. I get these message

```auto
GET /_cluster/allocation/explain 
{
  "index": "dcvs_nonmotorvehicle", 
   "shard": 3, 
   "primary": true
}

The results：
{
  "index": "dcvs_nonmotorvehicle",
  "shard": 3,
  "primary": true,
  "current_state": "unassigned",
  "unassigned_info": {
    "reason": "CLUSTER_RECOVERED",
    "at": "2020-04-10T03:40:41.127Z",
    "last_allocation_status": "no_valid_shard_copy"
  },
  "can_allocate": "no_valid_shard_copy",
  "allocate_explanation": "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",
  "node_allocation_decisions": [
    {
      "node_id": "TklXzLKySf-czdu8zZ5hyQ",
      "node_name": "MYSQL2",
      "transport_address": "10.45.156.202:9300",
      "node_attributes": {
        "cname": "202",
        "rack_id": "rack_two"
      },
      "node_decision": "no",
      "store": {
        "found": false
      }
    },
    {
      "node_id": "WDaA85bmQhKZxvgq4ve0Kw",
      "node_name": "MHA-MASTER",
      "transport_address": "10.45.156.210:9300",
      "node_attributes": {
        "cname": "210",
        "rack_id": "rack_three"
      },
      "node_decision": "no",
      "store": {
        "found": false
      }
    },
    {
      "node_id": "dAXXDGDyQaGcex6VcZP0eg",
      "node_name": "MYSQL1",
      "transport_address": "10.45.156.201:9300",
      "node_attributes": {
        "cname": "201",
        "rack_id": "rack_one"
      },
      "node_decision": "no",
      "store": {
        "found": false
      }
    }
  ]
} 

```

I want to know why did "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster" happen ? Thanks a lot.

---

<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:** [December 29, 2020, 4:03am UTC](https://discuss.elastic.co/t/cannot-allocate-because-a-previous-copy-of-the-primary-shard-existed-but-can-no-longer-be-found-on-the-nodes-in-the-cluster/257148/2 "2020-12-29T04:03:08Z")

</div>

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