Veracrypt Container File (200GB) deleted but Free Space Not Released

This is on my 1TB m.2nvme external SSD. I wanted to reduce my encrypted Veracrypt container to 100GB and free up 100GB so I deleted the current 200GB container file. I think it was my mistake to delete the file while it was mounted and perhaps dependencies could have still kept the file and not release the free space.

I have tried using “lsof | grep deleted” but could not see the deleted file and also checked processes that might be accessing the 200GB file but couldn’t identify anything that I could understand to release the free space.

Now my SSD is 99.9% full when it should have been 80% if the 200GB was freed.

Can someone help me with this? Thanks.

From what I know, Veracrypt is similar to LUKS and the same tools and procedures apply.

The container file is probably still mounted.
Perhaps Veracrypt has got a GUI for this - IDK.

To see what is mountd, simply type

mount

and look for lines that refer to /dev/mapper/... or /dev/loop/...

even easier and more clear could be:

lsblk -f

Once you found your file, unmount it.

sudo umount /mountpoint

You find that “mountpoint” in the output of both commands
lsblk -f
looks like a nicely labelled table, the last column being the “MOUNTPOINTS”
(where you mounted it to)

another way is to use the
truecrypt
command itself to fin out what is going on

man truecrypt
on how to use it

Another option is to shut down and boot a live system and remove the file from the outside
as booting your system with a nearly full filesystem could prove … difficult.

HTH

Done both your suggestions and did not see anything as you indicated.

I had deleted the container file before dismounting it on Veracrypt. As far as I remember, Truecrypt is history and I don’t have it installed anyway.

There must be a way to see why a deleted 200GB container file does not free up the space and what other processes could be depending on it to still hold it like a ‘prisoner’. I have checked processes but nothing looks related to veracrypt.

So, I hope someone knows where else to look, short of me backing up my 1TB SSD and reformat it again which I prefer not having to do.

rhetorical question:
How can you mount and then dismount it when you don’t even have the program installed?

anyway:
anything “holding on to it” will be history as soon as you reboot.

Could be a different story if you use BTRFS - I know nothing about it.
If you use ext4 you could adjust the “reserved for the root user” percentage
By default 5% of your 1000 GB are reserved for root and another chunk about the same size is used for the filesystem itself, and it’s journal.

tune2fs -m 1 /dev/sdxY
as an example

I do have veracrypt installed. Truecrypt is not the same as Veracrypt.

My 1TB SSD in question is a mounted external storage drive which is NTFS formatted, so not part of my Manjaro system.

Good to know.
Perhaps you should take that drive to a Windows machine and plug it in to have it’s filesystem checked - on Linux this can’t be done properly.

… but as far as I know, such files/containers can still be mounted and used with the standard Linux tool (cryptsetup).
I may be wrong though. Lack of experience.

I had already done that in the first instance (on Windows10) and it still showed the drive to be 99% used and not the 200GB free space that I had expected.

… then your file wasn’t actually as big as you thought, more than likely

These files, just like the files used as hard drive images for virtual machines, are created sparse.
They will grow up to their designated size if that is actually used up - but they will initially and actually only occupy as much space as the actual data you put in.

… might be listed as 200 GB, but if only 10 GB are stored in there, it’ll be only 10 GB in actual size.

they will grow to the limit
but not shrink back if not fully used, but they will only be as large as what was actually stored in them at one time
even though they are listed as at their max. size

How did you delete it? It could be in the trash maybe?

I deleted it “permanently”.

I booted Windows10 and found the 200GB that became locked in the folder Found.000 under a file with the extension .chk. Took admin permission to access this folder and deleted that file and the 200GB has been freed up.

Solved.

Thanks for all your responses.

Cheers

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.