﻿---
title: No Shards In Data Node
description: Describes what AutoOps detects and surfaces with the No Shards In Data Node insight: One or more data nodes have no shards allocated.
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/no_shards_in_data_node
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
---

# No Shards In Data Node
One or more data nodes have no shards allocated. That can be intentional during maintenance or decommissioning when data was drained first.
<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  | Low                                                 |
| Scope     | Node                                                |
| Domains   | performance, resource-utilization, shard-allocation |


## 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.

### Some data nodes do not contain any shards


#### What was detected

12 data node was detected as not containing any shards, meaning it doesn’t have any data on it. The affected node is: `es-data-01` and `es-data-02`

#### 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: A node with no shards, meaning no data, could be configured such intentionally or unintentionally. If it is intentional, no further action is required.
There can be a few reasons why a data node could have no shards.
The two most common reasons are:
1. A hardware change needs to be made and to prevent data loss, data was moved out of the node before the maintenance.
2. A node needs to be decommissioned and to prevent data loss, data was moved away from the node before shutting it down. Nodes might also lack shards due to bad configuration, for instance, bad allocation routing or previously valid allocation routing but the underlying node configurations (IP range, name, tags, and so on) changed for some reason.