As it seems not possible to directly use chroot for LXC storage (due to having to do it in a hacky way and apparently having problems with "su") I am using the default raw image.
The problem with this images is that once that you use space, it is never released. For example, I have a container with 20GB assignated. It is only using 3 GB but time ago it reached 7GB so the image still weights 7GB. I tried the zeroing method (dd if=/dev/zero of=/mytmpfile inside CT) but it didn't worked, actually now it weights 11GB.
Is there a way to reclaim the used space back?
BTW +1 for fully supported chroot for LXC, even if it means some security risk and no disk space control .
The problem with this images is that once that you use space, it is never released. For example, I have a container with 20GB assignated. It is only using 3 GB but time ago it reached 7GB so the image still weights 7GB. I tried the zeroing method (dd if=/dev/zero of=/mytmpfile inside CT) but it didn't worked, actually now it weights 11GB.
Is there a way to reclaim the used space back?
BTW +1 for fully supported chroot for LXC, even if it means some security risk and no disk space control .
Last edited: