Weird running out of space problems

Started by
16 comments, last by Strife 19 years, 10 months ago
Recently, I was getting some weird errors about running out of space on my 18 GB / partition (everything but things in /mnt (obviously) and /home is on this / partition). This is really weird as I''ve never had problems like that even when I originally ran linux on a 2 GB partition years ago. I have run df -h and it says indeed that I only have 578 MB available. But I still don''t believe it. I have also run du -h to try to pinpoint what''s taking up so much space, but I can''t locate it as of yet. All I can think of is maybe I had some filesystem error and should possibly check/repair it? Anyone else had these problems or know what to do? And FYI, I''m running Gentoo with Gentoo''s modified 2.6.3 kernel.
Advertisement
du -S | sort -gr | less

*trys this himself*

366708 ./var/cache/apt/archives

hmm... note to self, clear the archives...
add this line to your ~/.bashrc file:

alias ducks='du -cks * |sort -rn |head -20'


typing 'ducks' will give you the top 20 biggest files under the current directory (running in / will take a little while)



[edited by - grazer on May 17, 2004 6:24:13 PM]
I''m not a Gentoo user, but don''t they probably keep all the downloads and interm. files in a directory somewhere from all your compiles? Might want to see where they do that and check the directory size.

You might also have something spamming your log files. Take a look in /var/log, might be something going on.

Int.
quote:Original post by grazer
add this line to your ~/.bashrc file:

alias ducks=''du -cks * |sort -rn |head -20''


typing ''ducks'' will give you the top 20 biggest files under the current directory (running in / will take a little while)



[edited by - grazer on May 17, 2004 6:24:13 PM]


Run that command under root (without the "head -20"), and redirect to a file:
du -sk | sort -nr > ~/all_dirs.txt
Then vi the ~/all_dirs.txt
And go through the list, looking for directories which take up more space than you expect.

The number on the left is the size in KB of the contents of the directory and all subdirectories underneath it.


http://www.anywherenotes.com - never lose another note again.

http://www.mildspring.com - developing android games

Gentoo keeps the downloaded source files in /usr/portage/distfiles and the untarred source in /var/tmp/portage. Normally the untarred source is removed after an emerge, but if the emerge fails or is cancelled, the source remains. This can pile up fast. (OpenOffice takes ~3.5.GB of space to compile).

/var is a good place to start for cleaning up files, as well as /tmp.
Files in /var have been cleaned up though. And I *still* have these problems.
If you did a quick clean up of the likely culprits and still are short on space, you need to do one of the hints given here already to isolate your largest directory(ies). Then investigate that as well.

You can also use the find command with the +|- size option to find specific files as well.

Int.
quote:Original post by Strife
Files in /var have been cleaned up though. And I *still* have these problems.

I offered a simple solution. Look for big space wster after running the command I gave you.
I did, and absolutely nothing happened.

I have, of course, already tried du -h and written the output to a file and browsed it, but without being able to sort it, it''s really damn hard to read (I did grep for all the parts that were in the gigabytes, but none of those things were anything that shouldn''t have been that big (only a couple things, and all externally-mounted hard drives).

This topic is closed to new replies.

Advertisement