0

I have installed ubuntu 16.04 two days ago and the root partition space was 25 GB. while i was searching for solutions in one blog I found somebody telling me to check the log folder and delete it. I checked my log and it was almost 17 GB! then I deleted it.Then I run df -h and it showed root partition was 69% used. I run the same command after 2sec and it showed 71%. I ran it at least 15 times in 1 minute and eventually it got 100% full. Root partiton showing full in less than a minute. However I checked the log space after that and it showed empty...

Does this normally happens? If not than what is the solution? I am comparatively new to ubuntu and don't actually know what to do!

output of ls -lah /var/log/

Log description

1 Answers1

3

It is definitely not normal for your root volume to fill up so quickly. It's almost certainly either a problematic process which is most likely caught in some sort of infinite loop (writing errors to a log somewhere in /var/log/*) Or maybe a task you kicked off is using far more disk space that you expected (often in /tmp) so you need to narrow down what/where is using up the space.

Most likely it's a single file so try running:

find / -size +5G -print

as root which will give you a list of the full paths and filenames of anything over 5 gigabytes. If anything is listed in /tmp or /var (especially /var/log), it's a good bet you've found the problem file. If no files are listed, try running

du -s --one-file-system /*

as root to see how much the top-level directories are using. You can then recursively run this command on the largest result so if /tmp appears to be the problem, next try running:

du -s --one-file-system /tmp/*

and so on until you find the problem directory.

For future reference, a utility I find handy to keep installed is gdmap (http://gdmap.sourceforge.net/ - it's available in the package repos) which will let you quickly visually get a feel of disk usage both by directory and file in a directory tree. Unfortunately, with your root volume filling up as it is, it might not be possible for you to install additional packages right now.

blihp
  • 174