Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Bad free space estimation with file container formatted NTFS using filesystem compression #1308

Open
Searinox opened this issue Feb 17, 2024 · 0 comments
Labels

Comments

@Searinox
Copy link

Searinox commented Feb 17, 2024

On container files formatted NTFS, copying large files results in more being substracted from the estimated free space left than the file is actually sized at. The file properties of the esulting copy on the container show that the file has indeed been compressed, usually having ~10% less size on disk than the file size, yet the amount of free space deducted as seen in the drive properties is even more than the uncompressed file. If the container is unmounted and remounted, the free space is recalculated and correctly estimates free space.

Expected behavior

The free space left on the NTFS partition should be correctly estimated.

Observed behavior

The issue appears to occur mainly with single large files. Many smaller files totalling entire GBs has not been observed to substantially result in estimation gaps, if at all.

Steps to reproduce

  1. On a Windows 10 machine create a VeraCrypt file container, preferrably in the 100s of GB or so, and format it with NTFS, 4K cluster.
  2. Enable NTFS compression on the entire partition.
  3. Begin copying large files, preferrably several GB each into the container. Do not dismount the container at any point, keep it mounted until you've copied a sizable amount of data.
  4. Notice that the amount of space lost as a result of the copy process is substantially more than the total size of the files that were copied.
  5. Select the newly-copied files in the container and check their total size as well as size on disk and observe that they have indeed been compressed and that their total size is correct, and does not match the total occupied space on disk.
  6. Dismount and re-mount the container. Notice that the amount of used space has been recalculated and is now less, and is in line with how much space the files actually take up.

Your Environment

VeraCrypt version:
1.26.7

Operating system and version:
Windows 10 Pro build 19045.2604

System type:
64-bit

@Searinox Searinox added the bug label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant