veracrypt / VeraCrypt

Disk encryption with strong security based on TrueCrypt
https://www.veracrypt.fr
Other
6.8k stars 940 forks source link

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

Open metal450 opened 2 days ago

metal450 commented 2 days ago

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)."

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 commented 2 days ago

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...