Recovering From A Fork Bomb

The scenario: Your server is not working right: You cannot start new processes! Simple commands like "ls" fail:

yourname@yourserver:~$ ls
-bash: fork: retry: Resource temporarily unavailable

This is a symptom of the kernel reaching the maximum number of processes. On most systems, this is 32768 processes, and on 64-bit …

more ...

Files Hidden By Mount Points

The wolderful flexibility of being able to mount file systems at any point in the file system comes at a small cost: You can end up hiding files - usually by mistake.

For example, imaging having the following file systems:

  • / - the root file system. A small(ish) partition, usually only a …
more ...

Tracking Down Deleted-But-Still-Open Files

The situation: df (which shows disk usage) disagrees with du (which shows disk space taken up by files). So you have disk space which is "used", but it is not taken up by any files!? What gives!?

For example:

root@xps:~# df -h /tmp
Filesystem               Size  Used Avail Use% Mounted …
more ...

When Sorting Fails

When investigating disk usage issues on a very full disk, the investigation may actually be hampered by the lack of disk space. For example:

du -x -m / | sort -nr | head -25

can fail if you have a lot of directories and your disk is completely full: sort will only process …

more ...

My Disk Space Doesn't Add Up!

Sometimes your disk usage does not add up - for example:

karl@someserver:~$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        52G   49G  243M 100% /

So what gives? 49Gb + 248Mb is definitely less than 52Gb !! This is a sizeable discrepancy of at least 1.5 Gb!

Also, the …

more ...

Cleaning Up Disk Space

Let us assume you already figured out where your disk space went.

Cleaning up disk space is easy: You just delete stuf, right?

Well.. Mostly. There are a couple of things to watch out for:

  • Deleting important stuff is ... bad. You still want a working system, right?
  • Deleting files that …
more ...

Where Did My Disk Space Go?

Imagine the scenario: Your application does not work, and no errors are appearing in your log files. In fact: nothing new is appearing in your log files! Bah!

And then you discover that your root file system is full. And that's the only file system on the box:

Filesystem     1K-blocks …
more ...