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.


You should either use or derive from TrueCrypt which allowed you to safely create a mountable, encrypted, volume optionally auto-sizing with a maximum size set. Never heard of anybody getting problems because it grew too much.

Note that the encryption is stated not to be 100% safe and work on it suspended.

  • I'm afraid I can't accept your answer because TrueCrypt is no longer supported by it's developers and what's more important for me - I having a lot of troubles compiling it on Ubuntu 14.04.1. Right now I'm stuck at "lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line" and this whole situation discourages me a bit from using it. Probably there is other open-source alternatives to this solution? – user619271 Feb 5 '16 at 22:13
  • @user619271 there may be other OS solutions but if their crypo is any good someone stamps fast. – Steve Barnes Feb 5 '16 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.