Seeking help with Debian root drive being full

I have been having some trouble with my node lately. I first noticed getting alerts that my node was down and when I went to log in it wouldn’t take my user password but I could log in as root. A reboot seem to fix it. Then it started to happen more often. I started to Google the issue and found something saying to check file space on root.

I was able to get into terminal recovery mode and found that my root was 100% used. I ran several commands to cleanup space, deleted tmp and other stuff and got it down from 100%.

That seemed to help but it is starting to happen again and my node went down again and I found the root back at 100%. I don’t have any space to add more for the root (that I know of or how to check).
Is there any way to check for free space on the /dev?

When I started tonight, the reboot wouldn’t even load into the OS. I had to go back into recovery mode and delete stuff to get it to reboot. I am now in the GUI side as root. When I run df -h I get:

Anyone willing to help me troubleshoot?

Hello @rml52,
Welcome back!

You need to extend your root with more space.
Right now you may do several things:

  1. Remove not needed packages and clean the apt cache
sudo apt autopurge
sudo apt autoclean

If your Debian is old, you may be required to remove old kernel headers and images manually: Root drive is running out of disk space. How can I free up space? - Ask Ubuntu

  1. remove unused docker images (it will remove all images without containers)
docker system prune
  1. Redirect storagenode logs to the file: How do I redirect my logs to a file? - Storj Docs

You can do something like du -ha / | sort -hr | head -n 20 to get the folders which occupy the most space. If you have located them then you can dig deeper what is eating your space.

2 Likes

Please check journald logs, the /var/log/journal directory. journald usually rotates them, but I found the defaults lacking and this directories sometimes grow just too much. You can remove any files that have the @ character in the file name, this character signifies the file is historical.

Please install ncdu (with apt install ncdu) and use it to investigate which other directories grow, I found this tool the best available to investigate disk space usage in text mode. If you can’t, @jammerdan’s option is the second best, I guess.

1 Like

this would be an adventure, if your usage is 100% on the root…

If this is ext4, then there’s still a chance that there is free disk space allocated for root user. df doesn’t report this space.

yep, but it requires some Linux Admin Black Magic…

Not really, this is the default behavior of ext4.

1 Like

I had done the apt clean ups already
The Docker one says it reclaimed 2.16GB

Got down to 93%

Been waiting 20 mins for the du command to complete.

1 Like

This is what I see in /var/log

Isn’t there a way to check disk space with fdisk?

Please issue a

journalctl --disk-usage

image

2 Likes

How small is your system disk? I assume the logical volume resides on sda. Together with /boot and /boot/efi I can only see 20GB used. Is there any unallocated space left on that disk? Then just extend the logical volume.

I saw this too late, install ncdu and run it, it super duper fast, also there is a practice create a ballast file 500MB on disk, when you need it the most, delete that file.

Lots of usage on that docker overlay file system. Either a docker container is using a lot of disk, or you do not have log rotation so logs are blowing up the disk space.

1 Like

I speculate it is this. Any suggestions?

Let have a ncdu run then check, some suggestion:

  • filesystem could report full when run out of inode and not disk space (not in this case - just a general advise).
  • maybe don’t use desktop packages in a tight disk like this (I saw lightdm).
  • In the past I’ve a tcpdump process to /tmp and forget to kill it, it end up eating all diskspace, when you have some diskspace to breath, be sure to run df once in a while just to be sure nothing is eating it up.
1 Like

19GiB from their report

I would suggest to do not use a GUI and purge it, but it depends.