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

"cannot shrink the filesystem" (not a system partition - just data) #1423

Open
metal450 opened this issue Sep 27, 2024 · 1 comment
Open
Labels

Comments

@metal450
Copy link

metal450 commented Sep 27, 2024

I had an existing, Veracrypt-encrypted data-only partition. I needed to shrink it slightly (to make room for a different partition), so I decrypted it in-place, then resized it. Now I'm trying to re-encrypt it in-place. Whenever I try, Veracrypt says "cannot shrink the filesystem (the filesystem needs to be shrunk to make space for the volume header and backup header)."

  • The first suggestion it gives is to make sure there's enough free space. There's more than 150 gigs free.
  • The second suggestion it gives is to run scandisk. Scandisk reports no errors.
  • This thread suggests checking the Windows Event Viewer for details on the error. I can't find anything in the event viewer (which category should it be under?): https://sourceforge.net/p/veracrypt/discussion/technical/thread/968069cc/?limit=25#eab6
  • This thread suggests defragging. I think that's not relevant for SSDs, but I tried anyway (it took like 30 seconds in total). The error message persists: https://sourceforge.net/p/veracrypt/discussion/technical/thread/e4a3053c/?limit=25&page=1
  • This post has the same issue, but no solution: https://superuser.com/questions/1505705/cant-encrypt-a-non-system-drive-in-place-with-veracrypt
  • The remaining solution given by VeraCrypt is to basically create a whole separate encrypted partition/container, and copy the data back and forth. It's 4TB of data - besides being impractically slow, in this case I don't have another 4TB of local storage laying around (backups are on a remote NAS).
  • I tried to do the encryption from VeraCrypt in Linux, but it didn't give the option to encrypt in-place (only to format)
  • I used gparted to shrink the partition by 100MB (leaving 100MB of empty space after it). VeraCrypt still tries to shrink it, & says it can't.

Why is it reporting this error? Can it provide more specific details on why it's failing? How can I get it to re-encrypt properly, like it was just yesterday?

@metal450 metal450 added the bug label Sep 27, 2024
@metal450 metal450 changed the title "cannot shrink the filesystem" (not system partition - just data) "cannot shrink the filesystem" (not a system partition - just data) Sep 27, 2024
@metal450
Copy link
Author

In Windows' Disk Management, I right-clicked the partition->Shrink Volume; it says "Querying volume for available shrink space" for a bit & then allows me to shrink it just fine. Shrunk it another 100MB that way (so now there's 200MB of unallocated space after the partition - 100 from shrinking with gparted, and another 100 from shrinking within Windows). After the second shrink, VeraCrypt finally was able to encrypt.

Really need some better error reporting around this. Still no idea why this happened, why Windows could shrink it but VeraCrypt could not, and why manually shrinking with Windows solved it. But at least I (eventually) got past it...

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