﻿---
title: Shard Allocation Enable All
description: Describes what AutoOps detects and surfaces with the Shard Allocation Enable All insight: Shard allocation is turned off or restricted so the master cannot place new primaries, recover failed shards, or rebalance across data nodes.
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/shard_allocation_enable_all
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud on Kubernetes
  - Elasticsearch
applies_to:
  - Elastic Cloud Hosted: Generally available
  - Elastic Cloud on Kubernetes: Generally available
  - Elastic Cloud Enterprise: Generally available
  - Self-managed Elastic deployments: Generally available
---

# Shard Allocation Enable All
Shard allocation is turned off or restricted so the master cannot place new primaries, recover failed shards, or rebalance across data nodes. Indices might stay unassigned, new index creation can fail, and prolonged misconfiguration risks data loss after node failure.
<note>
  For a complete list of insights, refer to [AutoOps insights](https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch).
</note>


## Insight details


| Field     | Value                                      |
|-----------|--------------------------------------------|
| Component | Elasticsearch                              |
| Severity  | Medium                                     |
| Scope     | Cluster                                    |
| Domains   | configuration, shard-allocation, stability |


## Example: What you might see in AutoOps

The following is an example of what you might see when this insight is triggered. Real insights use live data and links from your deployment or cluster.

### Shard allocation is not enabled


#### What was detected

_No description available._

#### Recommendations

<note>
  AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
</note>

<dropdown title="Enable shard allocation">
  **Condition**: Always shown for this insight.Reset `cluster.routing.allocation.enable` so primary and replica shards can allocate to nodes.
  ```json

  {
    "transient": {
      "cluster.routing.allocation.enable": null
    },
    "persistent": {
      "cluster.routing.allocation.enable": null
    }
  }
  ```

  <note>
    Requires the `manage cluster` privilege. Requires Elasticsearch 8.0.0 or later. This action changes cluster or index configuration.
  </note>
</dropdown>


#### Background and impact

Impact: When shard allocation is not enabled, the master node will not be able to create new indices, recover corrupted indices or rebalance, which is likely to cause data loss.
Shard allocation is the process by which any shard is allocated to data nodes.
It might be temporarily turned off during maintenance, but should be re-enabled as quickly as possible after the maintenance window to avoid data loss and performance degradation.