How to delete an unassigned primary shard

Good day,

We're currently experiencing an issue with one of our index (let's call it sample_index) which has 21 primary shards with 1 replica. The primary shards of sample_index are distributed on all our nodes. Unfortunately, one of our node's disk crashed yesterday, and needs to be replaced. This made the primary shard of sample_index on that crashed node to be an unassigned primary shard, probably because it failed to be relocated due to the crash. This is causing our cluster in red state. I checked all other nodes, i can still see a primary shard of sample_index intact.

How can I delete the unassigned primary shard w/o affecting the primay shard of sample_index on other working nodes?

Here's the result when I ran allocation explain:

curl -XGET http://localhost:9200/_cluster/allocation/explain?pretty

  "index" : "sample_index",
  "shard" : 5,
  "primary" : true,
  "current_state" : "unassigned",
  "unassigned_info" : {
    "reason" : "NODE_LEFT",
    "at" : "2024-03-14T13:30:11.936Z",
    "details" : "node_left [HcOL6RzKQRegH4vwLg60jg]",
    "last_allocation_status" : "no_valid_shard_copy"
  },
  "can_allocate" : "no_valid_shard_copy",
  "allocate_explanation" : "cannot allocate because all found copies of the shard are either stale or corrupt",
  "node_allocation_decisions" : [
    {
      "node_id" : "DugpqTy2T2mWAGCaj24gsw",
      "node_name" : "inca-platform-es-nodes-001",
      "transport_address" : "10.3.0.101:9300",
      "node_attributes" : {
        "xpack.installed" : "true",
        "transform.node" : "false"
      },
      "node_decision" : "no",
      "store" : {
        "found" : false
      }
    }

But you said you have 1 replica right?
Why the replica is not promoted as primary?

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