I have a big index with ~16Gb shards. Recently I moved one of these big shards to less disk constrained node. The storage in the new node was reduced the expected size, and the shard was exchanged by a smaller one. But the disk storage from the parting shard never was recovered. Elastic search version is 2.4
Diggin in elastic search directories I found this
elasticsearch/clustername/nodes/0/indices/indexname$ du -hcx .
8.0K ./_state
8.0K ./1/_state <--- shard 0 does not live here
119M ./1/translog
15G ./1/index
15G ./1
8.0K ./2/_state
114M ./2/translog
16G ./2/index
16G ./2
8.0K ./4/_state <--- shard 4 does not live here
13M ./4/translog
16G ./4/index
16G ./4
8.0K ./3/_state
421M ./3/translog
16G ./3/index
16G ./3
62G .
62G total
looking to the shards listings:
curl -s 'http://localhost:9200/_cat/shards?h=n,i,s,p,sto' | grep the_index | sort
node-01 the_index 1 p 14.7gb
node-01 the_index 2 p 15.8gb
node-01 the_index 3 r 15.4gb
node-02 the_index 0 r 16.2gb
node-02 the_index 2 r 15.7gb
node-02 the_index 3 p 13.1gb
node-02 the_index 4 p 18.1gb
node-03 the_index 0 p 15.1gb
node-03 the_index 1 r 14.3gb
node-03 the_index 4 r 18.2gb
So in node 01 wich is the one I'm looking there is no shard 4 of the index but the files still there.
Is there a way to ask the cluster to do cleanup of these directories ?