# Evacuate node for maintenance

**URL:** <https://discuss.elastic.co/t/evacuate-node-for-maintenance/293914>\
**Category:** Elasticsearch\
**Created:** [January 10, 2022, 4:08pm UTC](https://discuss.elastic.co/t/evacuate-node-for-maintenance/293914 "2022-01-10T16:08:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![windows95](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@windows95](https://discuss.elastic.co/u/windows95)\
**Post date:** [January 10, 2022, 4:08pm UTC](https://discuss.elastic.co/t/evacuate-node-for-maintenance/293914/1 "2022-01-10T16:08:21Z")

</div>

Hi,

when I have a 3 node cluster and and 3 shards (1 primary, 2 replica) per index, as to my experience it is not possible to evacuate a node completely, which makes sense to me. Is it safe in this case to stop Elasticsearch service node by node for maintenance?

After re-including a node to the cluster, no primary shards get scheduled to that node. Is this expected behavior? Can this be a problem? If yes, how can I achieve automatic re-balancing of primary shards? Config looks like this:

```auto
# curl -s -k -u elastic:$elasticpw -X GET 'https://localhost:9200/_cluster/settings?include_defaults' | jq '.defaults.cluster.routing.allocation'
{
  "use_adaptive_replica_selection": "true",
  "rebalance": {
    "enable": "all"
  },
  "allocation": {
    "node_concurrent_incoming_recoveries": "2",
    "include": {
      "_tier": ""
    },
    "node_initial_primaries_recoveries": "4",
    "same_shard": {
      "host": "false"
    },
    "total_shards_per_node": "-1",
    "require": {
      "_tier": ""
    },
    "shard_state": {
      "reroute": {
        "priority": "NORMAL"
      }
    },
    "type": "balanced",
    "disk": {
      "threshold_enabled": "true",
      "watermark": {
        "flood_stage.frozen.max_headroom": "20GB",
        "flood_stage": "95%",
        "high": "90%",
        "low": "85%",
        "enable_for_single_data_node": "false",
        "flood_stage.frozen": "95%"
      },
      "include_relocations": "true",
      "reroute_interval": "60s"
    },
    "awareness": {
      "attributes": []
    },
    "balance": {
      "index": "0.55",
      "threshold": "1.0",
      "shard": "0.45"
    },
    "enable": "all",
    "node_concurrent_outgoing_recoveries": "2",
    "allow_rebalance": "indices_all_active",
    "cluster_concurrent_rebalance": "2",
    "node_concurrent_recoveries": "2",
    "exclude": {
      "_tier": ""
    }
  }
}

```

---

<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:** [January 10, 2022, 9:54pm UTC](https://discuss.elastic.co/t/evacuate-node-for-maintenance/293914/2 "2022-01-10T21:54:54Z")

</div>

> [@windows95](#):
>
> as to my experience it is not possible to evacuate a node completely, which makes sense to me

Why is that?

> [@windows95](#):
>
> s it safe in this case to stop Elasticsearch service node by node for maintenance?

Yes.

---

<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:** [February 7, 2022, 9:55pm UTC](https://discuss.elastic.co/t/evacuate-node-for-maintenance/293914/3 "2022-02-07T21:55:12Z")

</div>

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