/var

nealdxmhost

Verified User
Joined
Jan 1, 2009
Messages
232
Location
Los Angeles CA
/var partition keeps filling up like crazy and I have been hunting through this board trying to find a solution so far with no success

Up to now I have moved /var/lib/mysql to /home and symlinked like it showed in the help guide and that worked until the next day when /var filed up again, I dumped a ton of files in /var/log and that brought it down a little bit. Later in the day I logged back in and noticed that /var had dropped down to around 5% or so

This morning I get a call that mail is not working, I log into the server to discover that /var is full once again did some more chasing around with no luck. Last ditch effort I reboot the server and when it comes back up it is once again down to 5%

Needless to say I am feeling about as dumb as a box of rocks
 
var always fills up if its too small. If your partition is lvm you can easily expand it. If it is not lvm you might want to use like /usr/var and symlink it back to /var.

Use the du command to find out what is the folder taking up all the space.

Code:
du -h --max-depth=1 /var
 
I wish I had used LVM but I did not :rolleyes:

And the /usr partition is around the same size as well

This afternoon it was up to 87% so as a precaution I rebooted again and after reboot it was back down to 5%. Before rebooting I found some very large log files in /var/log/httpd/domains which I deleted but the change after deleting never showed up when I ran df -h

Very puzzling to say the least


var always fills up if its too small. If your partition is lvm you can easily expand it. If it is not lvm you might want to use like /usr/var and symlink it back to /var.

Use the du command to find out what is the folder taking up all the space.

Code:
du -h --max-depth=1 /var
 
Before rebooting I found some very large log files in /var/log/httpd/domains which I deleted but the change after deleting never showed up when I ran df -h

You should restart apache (or other services) which writes to a log file if you want it to be completely deleted.
 
Is /var/spool/mysql filling up with *.bin files? If so learn about them as you likely don't need them (they're only necessary if you're not otherwise backup up MySQL, or if you're replicating MySQL across multiple servers.

If you dont need them you can delete them from time to time (even automate that) or turn them off in my.cnf.

Jeff
 
That was what I thought at first and I used this guide, http://help.directadmin.com/item.php?id=12, to move /var/lib/mysql over to /home and then symlink it. That seemed to work for about a day or so and then I was once again having trouble sending or receiving emails because /var filled up again.

Further investigation this evening revealed there were a couple of web sites using outdated software that were getting hammered with all sorts of crazy traffic and creating HUGE domain error logs so for the time being I found this little guide to shut down error logging for the moment. http://forum.directadmin.com/showthread.php?t=42380&p=214453#post214453

Once those software issues are resolved then I can put those config files back to normal.

Trust me it has been a couple of aggravating days to say the least


Is /var/spool/mysql filling up with *.bin files? If so learn about them as you likely don't need them (they're only necessary if you're not otherwise backup up MySQL, or if you're replicating MySQL across multiple servers.

If you dont need them you can delete them from time to time (even automate that) or turn them off in my.cnf.

Jeff
 
Back
Top