Diagnose shard issues and repair a cluster's health

DELETE shardissue
PUT shardissue
GET _cat/shards?v
# sort by state
GET _cat/shards?v=true&h=index,shard,prirep,state,node,unassigned.reason&s=state
GET _cat/shards/shardissue?v

Commands - 1

Commands - 2

GET _cluster/allocation/explain
{
    "index" : "shardissue",
    "shard" : 0,
    "primary": false
}
PUT shardissue/_settings
{
    "number_of_replicas": 0
}
GET _cat/shards/shardissue?v

Commands - 3

# Disk nearing 85%
# To immediately restore write operations, 
# you can temporarily increase the disk watermarks 
# and remove the write block.

PUT _cluster/settings
{
    "persistent": {
    "cluster.routing.allocation.disk.watermark.low": "90%",
    "cluster.routing.allocation.disk.watermark.high": "95%",
    "cluster.routing.allocation.disk.watermark.flood_stage": "97%"
    }
}
PUT */_settings?expand_wildcards=all
{
    "index.blocks.read_only_allow_delete": null
}

Commands - 4

DELETE testindex
DELETE testindex-1
DELETE testindex-2
DELETE testindex-3
DELETE testindex-4
PUT _cluster/settings
{
    "persistent": {
    "cluster.routing.allocation.disk.watermark.low": null,
    "cluster.routing.allocation.disk.watermark.high": null,
    "cluster.routing.allocation.disk.watermark.flood_stage": null
    }
}

🙏

Thanks

for

Watching

Diagnose shard issues and repair a cluster's health

By Deepak Dubey

Diagnose shard issues and repair a cluster's health

Diagnose shard issues and repair a cluster's health

  • 164