Problem
After reading many posts/forum threads I still don't understand if my hard drive has some space left or not...
I started looking into it because I installed Syncthing today and a notification error says that my disk is almost full and syncthing can't run, but I thought that I had about 40 Go left...
What I did to try to understand it and solve it
- ran Disk analyzer (on root of system) : says 441,3 Go occupied / 45,4 Go available on total of 470,9 Go on a 480 GB disk
- ran Disk analyser as sudo (on root of system) : says 443,6 Go occupied / 45,4 Go available on total of 470,9 Go on a 480 GB disk
Note : I don't understand why only the "occupied "size is different... And I suppose that the 10 Go difference between 470 and 480 is due to reserved memory for the system or something like that (?).
- ran
df
which outputs /dev/sda5 459849800 433180284 3236916 100% / so says its full...
- ran
sudo du -h --max-depth=1 /
which outputs :
48G /var
0 /sys
4,0K /srv
4,0K /mnt
72M /root
63G /snap
4,0K /cdrom
1,9G /opt
22M /etc
du: impossible de lire le répertoire '/proc/3353/task/3353/net': Argument invalide
du: impossible de lire le répertoire '/proc/3353/net': Argument invalide
du: impossible de lire le répertoire '/proc/6203/task/6203/net': Argument invalide
du: impossible de lire le répertoire '/proc/6203/net': Argument invalide
du: impossible d'accéder à '/proc/80737/task/80737/fd/3': Aucun fichier ou dossier de ce nom
du: impossible d'accéder à '/proc/80737/task/80737/fdinfo/3': Aucun fichier ou dossier de ce nom
du: impossible d'accéder à '/proc/80737/fd/4': Aucun fichier ou dossier de ce nom
du: impossible d'accéder à '/proc/80737/fdinfo/4': Aucun fichier ou dossier de ce nom
0 /proc
325G /home
16K /lost+found
0 /dev
368K /tmp
272M /boot
21G /usr
8,0K /media
du: impossible d'accéder à '/run/user/1000/gvfs': Permission non accordée
du: impossible d'accéder à '/run/user/1000/doc': Permission non accordée
4,0M /run
460G /
so says there are about 10G free on the 470 Go total.
installed
ncduwhich likedusays that disk usage is459,2 GiBran
lsof -nP +L1
which outputs 1413 lines of "deleted" files (vast majority are "memfd:mozilla-ipc"...) of various size. But I didn't find how to sum all those files to check the total disk usage.
- ran
find /proc/[0-9]*/fd -lname '*(deleted)' 2>/dev/null | perl -lne '($l = readlink) =~ s/ (deleted)$//; print -s, " $_ $l"' | sort -g(command found on another askubuntu thread) to sort the result by file size
which outputs 1516 lines, and here are the top ten lines - I suppose first number is size in bytes (?) :
2482816 /proc/2758/fd/378 /memfd:gdk-wayland (deleted)
5439888 /proc/2758/fd/322 /memfd:gdk-wayland (deleted)
6031750 /proc/22782/fd/28 /tmp/.org.chromium.Chromium.7Uj5wU (deleted)
6987776 /proc/5122/fd/30 /memfd:mozilla-ipc (deleted)
8087040 /proc/2758/fd/351 /memfd:gdk-wayland (deleted)
8294400 /proc/2758/fd/224 /memfd:gdk-wayland (deleted)
8783424 /proc/2758/fd/327 /memfd:gdk-wayland (deleted)
8783424 /proc/2758/fd/360 /memfd:gdk-wayland (deleted)
9216000 /proc/2758/fd/331 /memfd:gdk-wayland (deleted)
67108864 /proc/2671/fd/6 /memfd:pulseaudio (deleted)
Questions
- I am in the state where I don't know if my disk is really full or not... there are a lot on inconsistencies in the numbers (I'm not saying the numbers are wrong, I suppose that they do not always mean the same thing, but this is non-intelligible to me). So if anyone can help me understand that point, I'll be grateful !
- I do not know if it's full because of "deleted" files that eat space or not. Any help on how to measure the disk usage of deleted files would also be appreciated
- FinalIy I don't understand why I see
63G /snapwithduwhile the Disk analyzer says its only188,4 ko. I understand that there are symlinks to snaps in this folder and it looks like those symlinks (to/var/lib/snapd/snaps/) account for 24 G saysdu. Are those 24 G also in the 63 G of/snap? I checked theduoutput of/snapand it doesn't look like so... But adding 63 G to the Disk analyzer output results in a total above the real disk size... This totally lost me...
Please tell me if you need more information, I'll be glad to give it to you :)
Edits
Full df output (numbers for /dev/sda5 differs because I have made some room...) :
Sys. de fichiers blocs de 1K Utilisé Disponible Uti% Monté sur
tmpfs 1625812 2204 1623608 1% /run
/dev/sda5 459849800 414179712 22237488 95% /
tmpfs 8129044 24768 8104276 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
/dev/sda1 523248 4 523244 1% /boot/efi
tmpfs 1625808 1720 1624088 1% /run/user/1000
Investigating further in order to understand better all this I realized that the Disks program on my system says that I have a sda2 partition of :
- 480 GB (479 564 137 472 bytes)
But those bytes are actually 480 gigabyte (10^9 bytes) but only 446.6 GB. The program also says sda5 partition has 47 GB free, which corresponds to the 46.8 Go given by the Disk Analyzer...
I never realized that disk storage space was given in "advantageous" gigabyte (10^9), and now better understand why I see a so "big" difference between the df output and Disk Analyzer.