filesystem full

Every 11 minutes I get a msg on the system console saying:-
Code:
kernel: pid xxx (dd), uid 2 inumber 1525*** on /: filesystem full

df shows that rootfs is 103%!!! used

Looks like I need to do some housekeeping!!

Where should I start?
 
Use du to determine the largest directories, you can start from /, using a simple filter helps much, for example:
Code:
du -sh /usr/local/* | sed -n /[0-9]G/p
1.4G   /usr/local/lib
1.0G   /usr/local/share
Then you can use M instead of G to get only Megabytes prefix.[/code]
 
Next time you should probably also consider to split up your system in different filesystems, that way the system might survive such a fill up. For example, on my UFS systems I always separate /home, /var, /usr, /usr/local and some others (depending on whether I use those or not) such as /usr/src (mainly so that I can mount it readonly) and /usr/doc.

This will ensure that whenever I overplay my hand by dumping too much data on my server (in /home) it won't affect the other parts of my system (because /var won't be affected the other services can still write their temp datafiles and/or logfiles).

I think this is an approach you should definitely consider using, even on a simple home server. Because it can help protect you against situations such as these.
 
My primary home server has two disks - one for the OS and programs, and one for my media. From time to time I do a du -d1 -h. The d1 drills down 1 level of folders. If you change that to d2 it will drill down two levels. The more you drill down the longer it can take for the results to so. The -d1 is a great way to get a high level view of the various folders.

OS disk is smaller, media disk is much much larger.
 
There's more ways to skin a cat. You have problem at / so start there. You can do:

cd / && du -smx * | sort -n

And see where the most utilization is. You can repeat this with subdirectories and then their subdirectories. With bigger FS you can use 'g' instead of 'm'.

As ShelLuser suggested it's good to split your directory structure in some way. There's no right way to do it, it depends on many factors and your needs.
 
Back
Top