Disk usage much higher than file size

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
exo

Disk usage much higher than file size

Post by exo »

Hello,

I'm trying to figure out why my disk usage is so much higher than the total file size. My disk usage is listed as 145G while it looks like my filesystem is only 67GB. I've attached screenshots from disk usage analyzer and df -h to better show the discrepancy. I've been searching for possible solutions but found nothing that worked for me. Since I saw multiple similar threads where the inode usage was the problem, I'm at 14M inodes on my device which is 12% IUse.

Does anyone have an idea of what command or tool I could use to track down those hidden 78GB?

(edit: As a side note, I've no idea why the total space listed in the disk usage analyzer overview is double the SSD size)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Lord Boltar

Re: Disk usage much higher than file size

Post by Lord Boltar »

Do you have GParted installed? You can use it to see all the partitions on your drive
rui no onna

Re: Disk usage much higher than file size

Post by rui no onna »

How is /dev/sda2 formatted?
exo

Re: Disk usage much higher than file size

Post by exo »

Thanks for the replies guys. I've attached a screenshot of gparted with all formatting info.
gm10

Re: Disk usage much higher than file size

Post by gm10 »

You have the / root partition mounted twice, that's why total capacity is double of what you've actually got.

Also you are not running the Disk Usage Analyzer as root so it cannot see files and folders that your user cannot see, and thus will not count them.

Moreover, make sure you've got "Allocated space" checked in Disk Usage Analyzer's View menu.

Last but not least, there will be space reserved on the disk for the system, you can show that like this:

Code: Select all

sudo tune2fs -l /dev/sda2 | grep Reserved
rui no onna

Re: Disk usage much higher than file size

Post by rui no onna »

gm10 wrote: Fri Aug 17, 2018 7:08 am Moreover, make sure you've got "Allocated space" checked in Disk Usage Analyzer's View menu.
How do you do this? For the life of me, I can't seem to find that option.
gm10

Re: Disk usage much higher than file size

Post by gm10 »

rui no onna wrote: Fri Aug 17, 2018 12:49 pm
gm10 wrote: Fri Aug 17, 2018 7:08 am Moreover, make sure you've got "Allocated space" checked in Disk Usage Analyzer's View menu.
How do you do this? For the life of me, I can't seem to find that option.
Every edition uses their own tool, you're probably doesn't have that option then or has it in a different place.
exo

Re: Disk usage much higher than file size

Post by exo »

gm10 wrote: Fri Aug 17, 2018 7:08 am You have the / root partition mounted twice, that's why total capacity is double of what you've actually got.

Also you are not running the Disk Usage Analyzer as root so it cannot see files and folders that your user cannot see, and thus will not count them.

Moreover, make sure you've got "Allocated space" checked in Disk Usage Analyzer's View menu.

Last but not least, there will be space reserved on the disk for the system, you can show that like this:

Code: Select all

sudo tune2fs -l /dev/sda2 | grep Reserved
Thanks gm10!

I couldn't figure out how to start Disk Usage Analyzer as root so I downloaded baobab and ran that as root via terminal. Then it took only moments to find two timeshift snapshots (that weren't displayed in the program) which took up around 75GB together. Problem solved :)
gm10

Re: Disk usage much higher than file size

Post by gm10 »

You are welcome.

Regarding running arbitrary GUI apps as root, since I posted this just yesterday:
gm10 wrote: Mon Aug 20, 2018 2:52 pm However, my suggestion would be that you can create a script ~/.local/bin/gksudo with this content:

Code: Select all

/usr/bin/pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $@
Don't forget to chmod u+x ~/.local/bin/gksudo. That way you can use gksudo even in launchers.
-- with that you can then just find Disk Usage Analyzer in the menu > right click > edit properties and prefix the command with gksudo (or whatever you end up calling the script) and when you run it it will then prompt your for a password and launch as root. I did that for the Disk Usage Analyzer myself - that program is fairly useless otherwise in my opinion.
Locked

Return to “Software & Applications”