I noticed the root drive of my home server (Debian) is at 99% capacity, which was odd to be because I don’t store anything on the root ssd. sudo df -h
confirms that 99% of my 256gb drive is full. But sudo du -sh *
all added up, only comes to about 30gb.
This is a pc that only runs docker containers and one virtual machine for home assistant. And yes I have restarted, Any ideas as to how to find the missing 200+ gigabytes?
EDIT: sudo ncdu
allowed me to find a 72gb [long string of characterless]-json.log file in /var/lib/docker/containers and many 1gb+ files in /var/lib/docker/overlay2. I’m not sure what to do with this information (or what’s safe to delete) but I’m getting somewhere.
One more puzzle piece here is that
du
won’t report on files that have been marked for deletion but are still held on to by some process. There’s anlsof
incantation to list those, but I can’t recall it off the top of my head.It used to be part of sysadmin work to detect the processes that held on to large files if
df
reports that you’re running out of space, and restart them to make them let go of the file. But I haven’t done that in ages. And if you restarted the host OS that should have taken care of that.I assume you also know how to prune container resources.
Good call on the docker prune, I didn’t think about that. That accounted for about 25GB. Still not enough but at least I’m not at 99% anymore.