1

The title is pretty obvious and common: the error below happens very often. Error message

What I am asking is why does it happen. I mean, look at the output of GParted (the first 4 partition are required by Windows) GParted output

It seems very obvious that I have a lot of free space on all the partitions. So, why the system says that the remaining space is so low?

4
  • Are you sure about that? From the looks of it, you only have a couple of gigabytes free in the partitions you use for Ubuntu. How is that a lot of free space? Also, why is /dev/sda4 empty?
    – John Scott
    Oct 12, 2015 at 18:43
  • 1
    In this case, I think it's the difference between unused and available space (i.e. the filesystem's reserved blocks): see this similar Q&A Why are the free space and available space not the same in system monitor? Oct 12, 2015 at 19:01
  • @FuzzyToothpaste sure it is not very much, but it seems that Ubuntu partition has >>3GiB, while sometimes the system says that I have 0 MiB left. /dev/sd4/ is a Windows 8 partition btw, and even though it seems empty, it has a lot of space used.
    – tigerjack
    Oct 14, 2015 at 7:40
  • @steeldriver it seems the most plausible solution until now and I think this is the problem. If ext4 works in the same way of ext3, it reserves 5% of space to root; in my case it is ~2.5GiB that I can't use. If you can, please provide this as an answer and it will be the accepted one ;)
    – tigerjack
    Oct 14, 2015 at 8:04

3 Answers 3

3

The space that is showing as "unused" is not necessarily available to the user.

Specifically, filesystems from the ext family reserve a number of disk blocks for system tasks as described here:

The default amount of reserved space for these filesystems is 5%.

From your screenshots we can see that your root filesystem is located on a partition of size 48.83GiB, so we would expect 48.83 x .05 = 2.44GiB reserved. The unused space is shown as 3.13GiB so that the available space should then be 3.13 - 2.44 = 0.69GiB - close to the 722.6MB shown by the warning message. (There will be rounding errors since the usage is only given to 2 decimals; also one is GiB and one is MB).

You can confirm the reserved block fraction using the dumpe2fs utility. For example, using my own boot partition:

sudo dumpe2fs /dev/sda1 | less

I can see that

Block count:              248832
Reserved block count:     12441

from which the reserved percentage is 12441/248832 x 100 = 5.00% as expected.

The reserved block fraction can be modified using the tune2fs utility, however I would not recommend doing that in this case - it's more appropriate for large (>TB) and/or non-system disks.

0

Temp files can take several gigabytes, so a few free gigabytes is not much.

Try cleaning your computer with WinDirStat (runs on Wine perfectly well). That will give you a graphical overview of where your disk space is going.

Also, you could use WinDirStat when you get a warning to check if the free space you think there is, isn't taken by some temporary file.

There are alternatives to WinDirStat that run native on Linux like KDirStat, but I always found WinDirStat to be better.

Good luck.

5
  • ubuntu has a Disk Usage Analyzer built-in. Oct 12, 2015 at 19:54
  • It is a good tool, but it doesn't answer my question:
    – tigerjack
    Oct 14, 2015 at 8:06
  • 1
    I can't consider this an answer. Besides it being wrong (it will not be due to temp files but due to reserved blocks) Windows tools are off topic, even more so when we have our own tools for this.
    – Rinzwind
    Oct 14, 2015 at 12:53
  • There is also KDirStat, but I find WinDirStat to be much better (and it does not require KDE libs). For this question this will indeed not be the correct answer. I hope however that it still can be useful for people coming across this question.
    – Smile4ever
    Dec 30, 2015 at 10:41
  • Cleaning temp files is circumventing the question actually :) Which was not what I meant to do, but it is what happened.
    – Smile4ever
    Dec 30, 2015 at 10:43
0

Do an apt-get clean to remove old package files and apt-get autoremove to remove unnecesary dependencies. Do du -hs /var/log to see if you have vry large logfiles.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .