Saturday, May 7, 2011

Linux Server Out of Space?

   Recently my Debian print server, which has happily run on an ancient Pentium 133 MHz box with 32 megs of RAM and dual 1.2 gig hard drives, suddenly stopped printing. Examining it showed that it had run out of free space and so couldn't spool print jobs anymore. A quick Google search showed several sites listing commands that would find large files on the system, but since there were no files on the disk larger than ~10 megs this was of limited help.

   Long story short, after much time spent looking for individual files that took up too much space I simply kicked X11 off the system. I had installed X on the box years ago when I was playing around with the idea of using the system as a sort of second guest desktop using X11 forwarding off a faster server to run Firefox. That had actually worked well enough, Firefox ran on the more modern server and displayed on the junk PC and it was all quite usable, but we rarely had enough people over that we needed 2 guest computers.

   Whenever there's a problem my first approach is to examine the situation and try to solve things in the way that least changes things, like running a host of commands trying to find some non-existent large unused file, but sometimes problems need a more direct brute force solution. Like nuking the single largest directory on the machine, even though that meant losing some functionality.

   If your server is running out of space and you can't find any large files that can be removed to clear space, check out these commands to find the largest directories on your system and see what programs you can do without.

No comments:

Post a Comment