I'm trying to remove the data role from one node by first excluding the node from shard allocation with:
PUT _cluster/settings
{
"transient" : {
"cluster.routing.allocation.exclude._name" : "node-001"
}
}
When the node showed 0 shards I changed "node.data" to false and restarted it, but the node failed to start with this error:
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Node is started with node.data=false, but has shard data: [/usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/4, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/7, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/2, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/9, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/3, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/1, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/8, /usr/share/elasticsearch/data/nodes/0/indices/KdyBcBhwQhmrcvW9mPy5eQ/6, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/4, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/2, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/0, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/9, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/3, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/1, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/5, /usr/share/elasticsearch/data/nodes/0/indices/YJXzvwdRR1qU6I23pr0SXQ/6, /usr/share/elasticsearch/data/nodes/0/indices/bagM1fomTDm_dwV3mymIpg/4, /usr/share/elasticsearch/data/nodes/0/indices/bagM1fomTDm_dwV3mymIpg/2, /usr/share/elasticsearch/data/nodes/0/indices/bagM1fomTDm_dwV3mymIpg/0, /usr/share/elasticsearch/data/nodes/0/indices/bagM1fomTDm_dwV3mymIpg/3]. Use 'elasticsearch-node repurpose' tool to clean up
There are no shards allocated to his node, so why am I getting this error?