# Why does elasticsearch assign shards to cold nodes?

**URL:** <https://discuss.elastic.co/t/why-does-elasticsearch-assign-shards-to-cold-nodes/306774>\
**Category:** Elasticsearch\
**Created:** [June 9, 2022, 9:04am UTC](https://discuss.elastic.co/t/why-does-elasticsearch-assign-shards-to-cold-nodes/306774 "2022-06-09T09:04:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [June 9, 2022, 9:04am UTC](https://discuss.elastic.co/t/why-does-elasticsearch-assign-shards-to-cold-nodes/306774/1 "2022-06-09T09:04:19Z")

</div>

elk: 7.17.3  
01-03 nodes I want to use for hot data search and storage and 04-05 nodes as cold and frozen nodes.  
I have read the es documentation. By default, the data of the collector will be sent to the data\_content node. The 04-05 node is not configured with the data\_content role. Why can it still be allocated to fragmented data?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/0/10dd3fe690f8d81006761110cf6ffa2faa159a77.png)

I guess it keeps the cluster and some metadata, but looking at the screenshot, it should contain shard data.

```auto
ip name node.role
10.120.0.8 es-node04 cd
10.120.0.14 es-node02 dhilmrstw
10.120.0.38 es-node05 cd
10.120.0.10 es-node03 dhilmrstw
10.120.0.30 es-node01 dhilmrstw

```

I want to achieve this, all data is stored on hot nodes and only migrated to cold nodes after N days, during which time cold nodes should not save shards.

---

<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:** [July 7, 2022, 9:04am UTC](https://discuss.elastic.co/t/why-does-elasticsearch-assign-shards-to-cold-nodes/306774/2 "2022-07-07T09:04:24Z")

</div>

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