Delete lost primary shard

Hi,

due to running out of disk space, I reduced number of replicas to 0 for a few indices. Of course during this time one node had a disk failure and I think the data is lost.
Now the cluster is red because one index has a missing primary shard without replica shard. The index has 30 shards, so 29 are available, 1 is lost. Is there a way to somehow ignore the lost replica shard and bring back the cluster to green?
I'm fine with losing the data from the lost shard. But it would be good to still have the other 29 shards.

Thank you!

You can replace the lost primary with an empty shard using the allocate_empty_primary command in the reroute API: Cluster reroute API | Elasticsearch Guide [8.14] | Elastic

1 Like

Thank you very much - worked like a charm.

Note to myself - never reduce replicas to 0 again.

... and take snapshots!