# Replacing a node but keeping data disk as-is

**URL:** <https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260>\
**Category:** Elasticsearch\
**Created:** [April 13, 2017, 8:50am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260 "2017-04-13T08:50:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eirc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eirc/32/11769_2.png) [@eirc](https://discuss.elastic.co/u/eirc)\
**Post date:** [April 13, 2017, 8:50am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260/1 "2017-04-13T08:50:29Z")

</div>

Would this work?

I'm planning to replace a node in the cluster by stopping it, moving the data disk from to the new one and joining it to the cluster. Will it be able to properly recognise the shards it's holding?

---

<div class="post-metadata">

**Author:** ![bleskes](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bleskes](https://discuss.elastic.co/u/bleskes)\
**Post date:** [April 21, 2017, 7:00am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260/2 "2017-04-21T07:00:35Z")

</div>

Yes, that should work.

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [April 21, 2017, 7:31am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260/3 "2017-04-21T07:31:34Z")

</div>

ideally you stop indexing into the shards on that node and call [synced flush](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html) before you shut down the node just to be on the safe side

---

<div class="post-metadata">

**Author:** ![eirc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eirc/32/11769_2.png) [@eirc](https://discuss.elastic.co/u/eirc)\
**Post date:** [April 21, 2017, 9:25am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260/4 "2017-04-21T09:25:09Z")

</div>

Yea forgot to mention it but it all worked ok. Didn't know about synced flush so I didn't do that, I just stopped elasticsearch on the node, moved the disk and all indices were moved successfully.

I'm not sure no data was lost at all but even if that happened it was in small numbers.

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [April 21, 2017, 9:26am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260/5 "2017-04-21T09:26:18Z")

</div>

my suggestion could only help in reducing the time to recover, your data should be safe!

---

<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:** [May 19, 2017, 9:34am UTC](https://discuss.elastic.co/t/replacing-a-node-but-keeping-data-disk-as-is/82260/6 "2017-05-19T09:34:25Z")

</div>

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