Hi,
I noticed that some of my indices are staying in a yellow state with missing replicas shards. When checking the allocation explain, I can see it's because:
- I have set the
total_shards_per_node
to one to ensure those indices are evenly distributed because they are write heavy, so there are as much shards+replicas as there are nodes - The remaining one that should be allocated have reach the disk space threshold so it cannot be allocated to it, and it cannot be allocated anywhere else as every other node already have a shard for this index
I need to keep one shard per node and as I understand it, the disk space is not an important criteria for shard distribution (Elasticsearch mostly use the load I think?).
The issue here is that Elasticsearch does not seem to have an issue with one of the node having reached the max threshold. If it did, it could have moved some of the indices that can be moved (there are some) in order to regain space and be able to allocate the missing shards.
Instead, it just stays in this state with indices that will never be allocated unless I make some room for it by relocating some shards manually.
You can see in the attached image that the disk usage is bad on 2-3 nodes but for the other it's fine, and they theoretically can all contain the same things (same roles on each nodes)
Is there anyway to make Elasticsearch do this kind of thing automatically?
A thing I can think of is to make the watermark low equals the watermak high, this way if ES stops allocating it will also relocate to be able to allocate? Am I right and if so, is there any downside for this?
Thanks!