Open 1ncend1ary opened 2 years ago
I've been looking into this for a while now, and fail to find any elegant solutions. The issue is that you actually can't use all the free space reported by the system, as the filesystem has overhead to actually write metadata, master file table, inodes, whatever the filesystem uses under the hood.
There's also very little information around, or at least from what I could find, how you would begin approximating the slack you need for the file to actually fit. You could do something rudimentary such as just capping the largest container possible to ~99% of the available space and in most cases that would be enough to never fail the file container creation process.
@Jertzukka
The issue is that you actually can't use all the free space reported by the system, as the filesystem has overhead to actually write metadata, master file table, inodes, whatever the filesystem uses under the hood.
This actually happens with the plain NTFS file system or any other file system with writes before reads. Try to create the big one file and another one to fill drive empty space up to 0. Then try to move first file to another drive. It won't let you do this, because will try to write to drive before a copy operation (movement between drives is a copy).
I've been looking into this for a while now, and fail to find any elegant solutions.
Solution is might be simple. Write an empty dummy file of %1 of a free space and >= 100MB to the drive near the container file. Then start to write the container file. When the space is reached 0, then try to join 2 files in that sequence: truncate in the middle the dummy file and then continue write into the container. Keep continue until the dummy file is 0 truncated.
Please see Steps to reproduce.
Expected behavior
Volume Creation Wizard exits normally.
Observed behavior
Please see Steps to reproduce.
Steps to reproduce
Screenshots
–
Your Environment
Please tell us more about your environment
VeraCrypt version: 1.25.9, dmg install
Operating system and version: Mac OSX 10.15.7
System type: 64-bit