I was just toying around with one of my LXD containers that has a loopback zfs volume. One strange thing I noticed is this:
I had 1.5GB of data stored in my container “test”. And then I deleted 300mb data. I was left with 1.2GB of data inside but then when I came back to host to check the size of my loopback volume file, it was still 1.5GB.
For the second test I duplicated 300mb twice inside the container. Thus I had now 1.8GB of data inside. Then I came back on host to check the loopback file size and it was 1.8GB.
The strange part is that size of loopback file is increasing on data addition but not decreasing on data deletion.
Is this normal behaviour or is something wrong with my setup?