# ECK cluster always on MigratingData status

**URL:** <https://discuss.elastic.co/t/eck-cluster-always-on-migratingdata-status/286941>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [October 18, 2021, 2:44am UTC](https://discuss.elastic.co/t/eck-cluster-always-on-migratingdata-status/286941 "2021-10-18T02:44:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenyg0911](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chenyg0911/32/91393_2.png) [@chenyg0911](https://discuss.elastic.co/u/chenyg0911)\
**Post date:** [October 18, 2021, 2:44am UTC](https://discuss.elastic.co/t/eck-cluster-always-on-migratingdata-status/286941/1 "2021-10-18T02:44:12Z")

</div>

eck: v1.8.  
kubernetes: v1.20.7

kubectl get es:  
NAME HEALTH NODES VERSION PHASE AGE  
es-v7132 yellow 4 7.13.2 MigratingData 83d

GET \_cat/health?v  
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending\_tasks max\_task\_wait\_time active\_shards\_percent  
1634523756 02:22:36 es-v7132 yellow 4 3 43 23 0 0 3 0 - 93.5%

GET \_cluster/settings

```auto
{
  "persistent" : { },
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "exclude" : {
            "_name" : "es-v7132-es-datas-2"
          }
        }
      }
    }
  }
}

```

Have tried:

PUT \_cluster/settings

```auto
{
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "exclude" : {
            "_name" : null
          }
        }
      }
    }
  }
}

```

All shards will sync correctlly.  
ButAfter a few minutes, The cluster healthy will turn back to yellow, some shards can't replicate, the eck cluster status MigratingData.

What's the problem? Should patch es to set PHASE?

---

<div class="post-metadata">

**Author:** ![Thibault\_Richard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thibault_richard/32/50513_2.png) [@Thibault\_Richard](https://discuss.elastic.co/u/Thibault_Richard)\
**Post date:** [October 19, 2021, 7:59pm UTC](https://discuss.elastic.co/t/eck-cluster-always-on-migratingdata-status/286941/2 "2021-10-19T19:59:36Z")

</div>

Data migration should occur when ECK downscales a cluster by removing one or more nodes. Before removing a node, the operator makes sure that there is no more data on it by updating the [Cluster-level shard allocation and routing settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html). This explains why you see that the node 'es-v7132-es-datas-2' is excluded from any allocation.

Depending on the amount of data to be moved, the migration can take hours. It is also possible that the migration will be blocked if your cluster cannot handle your data with the new smaller number of nodes (e.g.: an index with 1 primary and 2 replicas cannot be handled by a 2-nodes cluster).

What is the current and future topology of your cluster?  
Can you share the output of `GET /_cluster/health?level=indices&pretty`?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 16, 2021, 8:00pm UTC](https://discuss.elastic.co/t/eck-cluster-always-on-migratingdata-status/286941/3 "2021-11-16T20:00:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
