# Replace old Cold Node by a new one and migrate data

**URL:** <https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410>\
**Category:** Elasticsearch\
**Created:** [November 8, 2022, 10:04am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410 "2022-11-08T10:04:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenzedoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zenzedoon/32/110103_2.png) [@zenzedoon](https://discuss.elastic.co/u/zenzedoon)\
**Post date:** [November 8, 2022, 10:04am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/1 "2022-11-08T10:04:36Z")

</div>

Hello,  
I have an ELK cluster with 3 nodes (debian 11 and ELK 7.17.0) :

- node1 (master+hot+ingest+content) 2Tb
- node2 (master+worm) 3Tb
- node3 (master+cold) 4Tb  
the cluster now is on red status cause the node3 is full , and i can't add more space on it cause the disk is an azure managed disk which cannot exceed the limit of 4Tb ,  
Is there a way to create a new VM with ELK Cold role and migrate the data to it ??

---

<div class="post-metadata">

**Author:** ![hollerloudly](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@hollerloudly](https://discuss.elastic.co/u/hollerloudly)\
**Post date:** [November 8, 2022, 12:21pm UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/2 "2022-11-08T12:21:19Z")

</div>

Generally, if sharding is appropriate you can just run up an additional cold VM and have it join the cluster. This would rebalance shards away from the existing cold node to the new cold node.  
This assumes that cluster.routing.rebalance.enable is set to "all".

Need more information as to the shard count for each of your indices to see what you are dealing with. If you need to find out \_cat/Indicies will provide the info you need.

> **[cat indices API | Elasticsearch Guide \[7.17\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cat-indices.html)**

---

<div class="post-metadata">

**Author:** ![zenzedoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zenzedoon/32/110103_2.png) [@zenzedoon](https://discuss.elastic.co/u/zenzedoon)\
**Post date:** [November 9, 2022, 8:22am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/3 "2022-11-09T08:22:18Z")

</div>

> [@hollerloudly](#):
>
> eed more information as to the shard count for each of your indices to see what you are dealing

So as i understand i need to create a second cold nod (with the appropriate disk space) join this node to the cluster and move the shards to the new node then i can remove the old cold node without disturbing the cluster ??

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 9, 2022, 11:02pm UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/4 "2022-11-09T23:02:00Z")

</div>

Yep!

---

<div class="post-metadata">

**Author:** ![zenzedoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zenzedoon/32/110103_2.png) [@zenzedoon](https://discuss.elastic.co/u/zenzedoon)\
**Post date:** [November 13, 2022, 5:55pm UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/5 "2022-11-13T17:55:15Z")

</div>

is there a tutorial to how to made this migration step by step ??

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 13, 2022, 11:30pm UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/6 "2022-11-13T23:30:07Z")

</div>

1. Add new node to the cluster
2. Use [Cluster-level shard allocation and routing settings | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/modules-cluster.html#cluster-shard-allocation-filtering) to exclude allocation on the old node
3. Wait till re-allocation is complete then remove the old node

---

<div class="post-metadata">

**Author:** ![zenzedoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zenzedoon/32/110103_2.png) [@zenzedoon](https://discuss.elastic.co/u/zenzedoon)\
**Post date:** [November 14, 2022, 9:09am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/7 "2022-11-14T09:09:41Z")

</div>

> [@warkolm](#):
>
> Wait till re-allocation is complete then remove

Hello Thanks for replying  
Is these steps are good even when there are no replicas for all shards ?? i mean all the shards on the cold node are primary and the cluster dosen't allow replicas ??

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 14, 2022, 9:25am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/8 "2022-11-14T09:25:22Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![zenzedoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zenzedoon/32/110103_2.png) [@zenzedoon](https://discuss.elastic.co/u/zenzedoon)\
**Post date:** [November 14, 2022, 9:39am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/9 "2022-11-14T09:39:16Z")

</div>

> [@zenzedoon](#):
>
> primary and the cluster dosen't allow replic

Thanks i will try this solution and i will give you a feed back .

---

<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:** [December 12, 2022, 9:40am UTC](https://discuss.elastic.co/t/replace-old-cold-node-by-a-new-one-and-migrate-data/318410/10 "2022-12-12T09:40:02Z")

</div>

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