# Best practice to put a node under maintenance

**URL:** <https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548>\
**Category:** Elasticsearch\
**Created:** [October 10, 2011, 8:49am UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548 "2011-10-10T08:49:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlo](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@erlo](https://discuss.elastic.co/u/erlo)\
**Post date:** [October 10, 2011, 8:49am UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548/1 "2011-10-10T08:49:00Z")

</div>

Hello,

I've a simple question, is there a way to move a specific shard from a  
node to a specific other node ?

For example, if I don't want a to have any replicas, and my data is set  
as many shards on many nodes:

NODE1:  
SHARD1,SHARD4

NODE2:  
SHARD2,SHARD5

NODE3:  
SHARD3,SHARD6

If I shutdown the NODE3, SHARD3 and SHARD6 will be unavailable. How can  
I move SHARD3 to NODE1, and SHARD6 to NODE2 _without_ setting replica=1  
to this index ?

Thanks !

--  
Erwan

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [October 11, 2011, 3:26pm UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548/2 "2011-10-11T15:26:25Z")

</div>

Probably I don't properly understand your usecase, but if you have  
replica\>1 then there is no problem with removing the node3 as the  
shards are already replicated (at least once) to another node(s), no?

On 10 Okt., 10:49, Erwan Loaëc [erwan.lo...@cgin.fr](mailto:erwan.lo...@cgin.fr) wrote:

> Hello,
> 
> I've a simple question, is there a way to move a specific shard from a  
> node to a specific other node ?
> 
> For example, if I don't want a to have any replicas, and my data is set  
> as many shards on many nodes:
> 
> NODE1:  
> SHARD1,SHARD4
> 
> NODE2:  
> SHARD2,SHARD5
> 
> NODE3:  
> SHARD3,SHARD6
> 
> If I shutdown the NODE3, SHARD3 and SHARD6 will be unavailable. How can  
> I move SHARD3 to NODE1, and SHARD6 to NODE2 _without_ setting replica=1  
> to this index ?
> 
> Thanks !
> 
> --  
> Erwan

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 12, 2011, 9:07pm UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548/3 "2011-10-12T21:07:13Z")

</div>

It is possible in master (upcoming 0.18):  
[Cluster / Index level allocation filtering · Issue #1311 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1311), by excluding  
that relevant node for shard allocation (can be done also based on IP, see  
at the bottom of the issue).

On Mon, Oct 10, 2011 at 10:49 AM, Erwan Loaëc [erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr) wrote:

> Hello,
> 
> I've a simple question, is there a way to move a specific shard from a node  
> to a specific other node ?
> 
> For example, if I don't want a to have any replicas, and my data is set as  
> many shards on many nodes:
> 
> NODE1:  
> SHARD1,SHARD4
> 
> NODE2:  
> SHARD2,SHARD5
> 
> NODE3:  
> SHARD3,SHARD6
> 
> If I shutdown the NODE3, SHARD3 and SHARD6 will be unavailable. How can I  
> move SHARD3 to NODE1, and SHARD6 to NODE2 _without_ setting replica=1 to  
> this index ?
> 
> Thanks !
> 
> --  
> Erwan

---

<div class="post-metadata">

**Author:** ![erlo](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@erlo](https://discuss.elastic.co/u/erlo)\
**Post date:** [October 13, 2011, 8:00am UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548/4 "2011-10-13T08:00:22Z")

</div>

Hello Shay,

Thanks for the answer, this feature is what I was looking for.  
When have you planned to release 0.18.0 ?

--  
Erwan

Shay Banon wrote:

> It is possible in master (upcoming  
> 0.18): [Cluster / Index level allocation filtering · Issue #1311 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1311), by  
> excluding that relevant node for shard allocation (can be done also  
> based on IP, see at the bottom of the issue).
> 
> On Mon, Oct 10, 2011 at 10:49 AM, Erwan Loaëc \<[erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr)  
> [mailto:erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr)\> wrote:
> 
> ```
> Hello,
> 
> I've a simple question, is there a way to move a specific shard from
> a node to a specific other node ?
> 
> For example, if I don't want a to have any replicas, and my data is
> set as many shards on many nodes:
> 
> NODE1:
> SHARD1,SHARD4
> 
> NODE2:
> SHARD2,SHARD5
> 
> NODE3:
> SHARD3,SHARD6
> 
> If I shutdown the NODE3, SHARD3 and SHARD6 will be unavailable. How
> can I move SHARD3 to NODE1, and SHARD6 to NODE2 _without_ setting
> replica=1 to this index ?
> 
> Thanks !
> 
> -- 
> Erwan
> 
> ```

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 14, 2011, 11:48am UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548/5 "2011-10-14T11:48:16Z")

</div>

Thinking of releasing 0.18 in 1-2 weeks.

On Thu, Oct 13, 2011 at 10:00 AM, Erwan Loaëc [erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr) wrote:

> Hello Shay,
> 
> Thanks for the answer, this feature is what I was looking for.  
> When have you planned to release 0.18.0 ?
> 
> --  
> Erwan
> 
> Shay Banon wrote:
> 
> > It is possible in master (upcoming 0.18): [https://github.com/](https://github.com/)\*\*  
> > elasticsearch/elasticsearch/\*\*issues/1311[https://github.com/elasticsearch/elasticsearch/issues/1311](https://github.com/elasticsearch/elasticsearch/issues/1311),  
> > by excluding that relevant node for shard allocation (can be done also based  
> > on IP, see at the bottom of the issue).
> > 
> > On Mon, Oct 10, 2011 at 10:49 AM, Erwan Loaëc \<[erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr)\<mailto:  
> > [erwan.loaec@cgin.fr](mailto:erwan.loaec@cgin.fr)\>\> wrote:
> > 
> > Hello,
> > 
> > I've a simple question, is there a way to move a specific shard from  
> > a node to a specific other node ?
> > 
> > For example, if I don't want a to have any replicas, and my data is  
> > set as many shards on many nodes:
> > 
> > NODE1:  
> > SHARD1,SHARD4
> > 
> > NODE2:  
> > SHARD2,SHARD5
> > 
> > NODE3:  
> > SHARD3,SHARD6
> > 
> > If I shutdown the NODE3, SHARD3 and SHARD6 will be unavailable. How  
> > can I move SHARD3 to NODE1, and SHARD6 to NODE2 _without_ setting  
> > replica=1 to this index ?
> > 
> > Thanks !
> > 
> > -- Erwan

---

<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 6, 2017, 3:52am UTC](https://discuss.elastic.co/t/best-practice-to-put-a-node-under-maintenance/5548/6 "2017-07-06T03:52:00Z")

</div>


