Empty /var

Sorry if this is a noob question, but on one of my server /var is getting full all the time and I have to reboot the server almost every day. /var is 4GB in size and right no df -h states that it's -1.6k free.

What can I do so that I don't have this problem?

FreeBSD 7.0-RELEASE running apache, mysql and openfire.
 
Check to see if your issue is your logs or what could be using up most of the space (what do you use your server for?)

You can try adding another harddrive, back up your /var, move it over to the new hard drive.
 
Use
Code:
du -k -d 1 /var
to find out what the biggest space consuming sub-directory is. You can move that one over to a bigger partition (like /usr) and symlink to it (stop relevant processes first). It's likely to be /var/log or /var/db (mysql). If you want to look deeper, use
Code:
du -k -d 2 /var
.
 
Thanks DutchDaemon. It was /var/db that was the bad guy so I created a symlink to /usr instead
 
Back
Top