I have an arch linux container with storage quota applied(btrfs as backend storage):
lxc config device add container_name root disk pool=default path=/
lxc config device set container_name root size 25GB
lxc info container_name gives output:
root: 20.00MB(it was not exactly 20MB)
Later i added a 5GB file in the container:
fallocate -l 5G bar
Then the root size of the container was something more than 5GB.
2 days later when i checked again the root size of the container is:
The 5GB file is still there in the container
-rw-r–r-- 1 root root 5368709120 Jun 27 16:00 bar
Is it the btrfs compression thats causing this behavior?
sudo btrfs qgroup show -pcref of the container
qgroupid rfer excl max_rfer max_excl parent child
0/469 5.43GiB 21.42MiB 23.28GiB none — —
Any extra thoughts about this?