You can choose to update these settings by either using byte or percentage values, but be sure to remember this important note from the Elasticsearch documentation: “Percentage values refer to used disk space, while byte values refer to free disk space.” Reason 6: Multiple Elasticsearch versions If you want your configuration changes to persist upon cluster restart, replace “transient” with “persistent”, or update these values in your configuration file. You can check the disk space on each node in your cluster (and see which shards are stored on each of those nodes) by querying the cat API:Ĭurl -XPUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d ' Once a node has reached this level of disk usage, or what Elasticsearch calls a “low disk watermark”, it will not be assigned more shards. The primary node may not be able to assign shards if there are not enough nodes with sufficient disk space (it will not assign shards to nodes that have over 85 percent disk in use). You will now need to reindex the missing data, or restore as much as you can from a backup snapshot using the Snapshot and Restore API. Pinpointing problematic shardsĮlasticsearch’s cat shards API will tell you which shards are unassigned, and why: They are also directed to localhost, which assumes that you are submitting the request locally otherwise, replace localhost with your node’s IP address. The commands in this post are formatted under the assumption that you are running each Elasticsearch instance’s HTTP service on the default port (9200). Shard data no longer exists in the cluster.Shard allocation is purposefully delayed.If you already know the data’s worth saving, jump to the solutions: In Elasticsearch, a healthy cluster is a balanced cluster: primary and replica shards are distributed across all nodes for durable reliability in case of node failure.īut what should you do when you see shards lingering in an UNASSIGNED state?īefore we dive into some solutions, let’s verify that the unassigned shards contain data that we need to preserve (if not, deleting these shards is the most straightforward way to resolve the issue). Within this blog post, we will refer to this term as “primary”. Editor’s note: Elasticsearch uses the term “master” to describe its architecture and certain metric names.