0

I've ran out of space and decided to free memory by deleting virtual machine files holding 3.8G. After that I see strange df output:

$ df -h | grep 'sda2\|Use'
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       110G  107G     0 100% /

Where are these available gigabytes that I've freed? System is unusable but it should be at least few gigabytes of space.

Tried to reboot, checked free inodes, tried to look at sudo lsof +L1 output - nothing.

Could anybody help?

UPD for @Katu:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           795M   34M  762M   5% /run
/dev/sda2       110G  106G     0 100% /
tmpfs           3.9G   96K  3.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda1       464M  451M     0 100% /boot
tmpfs           795M   12K  795M   1% /run/user/123
tmpfs           795M     0  795M   0% /run/user/1000
  • 3.8 G? 5G? You're not talking about the reserved space on ext4 filesystems, right? – muru Oct 17 '18 at 13:40
  • @muru, could not get what you mean, explain please – Dmitriy Vinokurov Oct 17 '18 at 14:11
  • ext4 reserves some fraction of total space for use only by root. That's why it's shown as 100% used here, but actual usage is 107G and not 110G. Is that what you're asking about here? Or did you expect the free space to become 107-3.8 =~ 103G? – muru Oct 17 '18 at 14:14
  • @muru, before deleting VM there was 110/110G used and 0 avail. After deleting - 107/110G used but still 0 avail. I expect that there will be 3 avail after deleting VM. – Dmitriy Vinokurov Oct 17 '18 at 14:21
  • 2
    ext4 reserves space for *root*. This reserved space is not shown in available space. – muru Oct 17 '18 at 14:23
  • Can you add the output of `df -h` without the grep part? Maybe your file was mounted in a different mount point. – Katu Oct 17 '18 at 14:30
  • @Katu, done, see the post – Dmitriy Vinokurov Oct 18 '18 at 03:44
  • @muru, interesting... Tried to create big file by user - failure, retried by root - ok. Though if it is so, then I expect that `df` output for root should show available space, but it is not. Strange, but seems that you are correct. – Dmitriy Vinokurov Oct 18 '18 at 03:48
  • 3
    Possible duplicate of [df -h - Used space + Avail Free space is less than the Total size of /home](https://askubuntu.com/questions/249387/df-h-used-space-avail-free-space-is-less-than-the-total-size-of-home) – muru Oct 18 '18 at 05:44
  • @DmitriyVinokurov thanks. I was hoping that you maybe had /home in a different partiion. Your /boot is full too, you might want to `sudo apt autoremove`? But this is unrelated and I don't know how to solve your problem. – Katu Oct 18 '18 at 08:37

1 Answers1

1

If you haven't delete your virtual machine from command line, you have to empty the trash to see change in df -h.

You could also check the biggest files in your system to delete or backup.

find . -type f -size +100M

Or whatever size you want.

Gounou
  • 591
  • 3
  • 7