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 /var0 /sys4,0K /srv4,0K /mnt72M /root63G /snap4,0K /cdrom1,9G /opt22M /etcdu: impossible de lire le répertoire '/proc/3353/task/3353/net': Argument invalidedu: impossible de lire le répertoire '/proc/3353/net': Argument invalidedu: impossible de lire le répertoire '/proc/6203/task/6203/net': Argument invalidedu: impossible de lire le répertoire '/proc/6203/net': Argument invalidedu: impossible d'accéder à'/proc/80737/task/80737/fd/3': Aucun fichier ou dossier de ce nomdu: impossible d'accéder à'/proc/80737/task/80737/fdinfo/3': Aucun fichier ou dossier de ce nomdu: impossible d'accéder à'/proc/80737/fd/4': Aucun fichier ou dossier de ce nomdu: impossible d'accéder à'/proc/80737/fdinfo/4': Aucun fichier ou dossier de ce nom0 /proc325G /home16K /lost+found0 /dev368K /tmp272M /boot21G /usr8,0K /mediadu: impossible d'accéder à'/run/user/1000/gvfs': Permission non accordéedu: impossible d'accéder à'/run/user/1000/doc': Permission non accordée4,0M /run460G /
so says there are about 10G free on the 470 Go total.
installed
ncdu
which likedu
says that disk usage is459,2 GiB
ran
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 /snap
withdu
while 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 thedu
output of/snap
and 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 :)