# Removing a node

**URL:** <https://discuss.elastic.co/t/removing-a-node/138219>\
**Category:** Elasticsearch\
**Created:** [July 2, 2018, 1:43pm UTC](https://discuss.elastic.co/t/removing-a-node/138219 "2018-07-02T13:43:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [July 2, 2018, 1:43pm UTC](https://discuss.elastic.co/t/removing-a-node/138219/1 "2018-07-02T13:43:15Z")

</div>

Attempting to remove a node from a 5.6 cluster and did:

```
# cat /tmp/rmnode
{
  "transient" :{
      "cluster.routing.allocation.exclude._ip" : "10.3.3.12"
   }
}
# curl -s -XPUT 10.3.3.12:9200/_cluster/settings -H 'Content-Type: application/json' -d @/tmp/rmnode | jq .; echo
{
  "acknowledged": true,
  "persistent": {},
  "transient": {
    "cluster": {
      "routing": {
       "allocation": {
          "exclude": {
            "_ip": "10.3.3.12"
          }
        }
      }
    }
  }
}

```

reallocation also started but it now seems to have stop and still have 15 shards on node:

```
# curl -s -XGET 10.3.3.12:9200/_cluster/health?pretty | jq .
{
  "cluster_name": "mx9es",
  "status": "green",
  "timed_out": false,
  "number_of_nodes": 5,
  "number_of_data_nodes": 4,
  "active_primary_shards": 140,
  "active_shards": 280,
  "relocating_shards": 0,
  "initializing_shards": 0,
  "unassigned_shards": 0,
  "delayed_unassigned_shards": 0,
  "number_of_pending_tasks": 0,
  "number_of_in_flight_fetch": 0,
  "task_max_waiting_in_queue_millis": 0,
  "active_shards_percent_as_number": 100
}

# curl -s -XGET '10.3.3.12:9200/_cat/allocation?v'
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
    88 241.8gb 242.6gb 202.6gb 445.2gb 54 10.3.3.11 10.3.3.11 cbdB
    15 38.3gb 39gb 406.2gb 445.2gb 8 10.3.3.12 10.3.3.12 cbdC
    89 249.2gb 250.2gb 634.2gb 884.4gb 28 10.3.3.13 10.3.3.13 cbdD
    88 272gb 273.2gb 175.8gb 449.1gb 60 10.3.3.10 10.3.3.10 cbdA

```

How to get the last 15 shards to move elsewhere?

---

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [July 3, 2018, 12:06pm UTC](https://discuss.elastic.co/t/removing-a-node/138219/2 "2018-07-03T12:06:41Z")

</div>

Patched all nodes to latest 5.6.10 and restarted them one by one seemed to finish evacuating the last shards 🙂

Now I can reploy removed node...

---

<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 31, 2018, 12:06pm UTC](https://discuss.elastic.co/t/removing-a-node/138219/3 "2018-07-31T12:06:45Z")

</div>

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