I'm actually not entirely sure this is a bug, but it is a bit annoying. I'd like to set both the shrink and grow autosize threshold at the same time but it doesn't seem to be working. Take the following example:
request = new NaElement("volume-autosize-set");
request.addNewChild("volume", volumeName);
request.addNewChild("mode", "grow_shrink");
request.addNewChild("shrink-threshold-percent", "84");
request.addNewChild("grow-threshold-percent", "92");
request.addNewChild("maximum-size", maxVolSizeGB+"g");
request.addNewChild("increment-size", "50g");
Now if I run this against a volume that's <20GB in size the defaults are grow at 92% and shrink at 85% so it'll work fine. However, if I run this against a volume >4TB, the defaults are grow at 98% and shrink at 93% and it throws the following error:
Reason: Autosize grow threshold must be larger than the shrink threshold. (errno=160)
So, even though I'm asking to change both of them at the same time, something internal is asking for the grow threshold to be set first which conflicts with the shrink. My workaround is to set the shrink value first, then make a second call for the grow. Is this expected behavior?
I should also note that, indeed changing them at the same time works fine, as long as they don't overlap with the volume defaults.