I am looking for a software to create a resizeable (growing) mountable container inside a file. The concept is simple: I have a file-container, I mount this file container to a mount-point and then copy files into it. The container grows as long as it needs free space to store files inside itself. A good example is given at this article:
But in the comments people are pointing that given approach is unsafe because it have unsolved issues with the limitations on the disk space: when a free space of underlying filesystem will end, any file operation could cause data corruption. So I'm seeking for a good reliable solution how to create such auto-resizeable containers.
Answers should mention how the solution manages to not corrupt anything when the underlying filesystem runs out of space.
It would be perfect if using this solution I could also encrypt the container-file contents with an arbitrary encryption algorithm.