0

So I moved some files to an USB stick and deleted them afterwards. I did this multiple times and I expected my free space to be around 3GB. However it says that I only have a couple hundred MBs of free space.

Hence I used du -h and xdiskusage to check what's taking up the space. du -h doesn't show anything and the consumed space is 3GB below the USB -stick capacity. xdiskusage shows me a 3GB block called "(permission denied)" which seems to be the cause of the missing space.

(I also ran sudo lsof | grep deleted to see if anything has deleted files opened.)

How do I free this space?

I'm using Debian 9 with KDE and the dolphin file manager.

8
  • Does df -h show the space being retrieved? – Raman Sailopal Oct 5 '17 at 13:58
  • df -h shows the same amount of free space as dolphin which is not enough. – mYnDstrEAm Oct 5 '17 at 14:00
  • I would not worry too much about it and would just wipe it. – Rui F Ribeiro Oct 5 '17 at 14:19
  • 1
    My rationale is that it might not be worth the time trying to fix it. If it is, umount it and try a fsck – Rui F Ribeiro Oct 5 '17 at 14:41
  • 1
    I must agree with @RuiFRibeiro. Back-up your data, do a fsck on the disk after you unmount it, then just recreate the partitions and fs on it. – Alex Austin Oct 6 '17 at 14:29
0

From the xdiskusage man page:

"(permission denied)" is space that df said was used but du did not report. Besides permission errors when running du, this may also be the result of a file deleted from its containing folder, but still in use by a program, so its space is not reclaimed yet. Mounted loopback filesystems (ISO image just checked before burning, then deleted while still mounted) are common examples.

Another instance where this can occur is when using btrfs subvolumes. df reports the size of the entire filesystem, but du only shows the files in the mounted subvolume. Therefore, any space used by other subvolumes of this filesystem will appear as "(permission denied)". To see what's there, you'll have to mount the other subvolumes and xdiskusage them individually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.