To scale down ElasticSearch, I usually disable allocation on a node, wait for shards to relocate, and then remove the node, e.g.:
curl -X PUT "localhost:9200/_cluster/settings" -d'{
"transient" : {
"cluster.routing.allocation.exclude._name" : "node-4"
}
}'
As I understand, open indices' shards will be relocated to other nodes... but what happens to closed indices?
A closed index is, per my understanding, ignored on snapshots... so it makes me think if it will be ignored when setting an allocation exclusion as well.
After excluding allocation to a node, I went to check its disk usage... and it seems like it still has a lot of things there:
$ du -hs /usr/share/elasticsearch/nodes/0/
131G /usr/share/elasticsearch/nodes/0/
So, my questions are:
As far as I could understand:
Nothing happens, they are kept on the node being excluded.
Unsafe. Data might be lost when you permanently delete the node (i.e. terminate the machine and its storage).