Having problems with disk space

dnoe

Registered
Jun 21, 2012
1
0
1
cPanel Access Level
Root Administrator
I am having problems with running out of space on /var. What is the best way to go about cleaning that up, without messing stuff up.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
The best way to do it would be to move /var/lib/mysql to /home after ensuring you have a full backup of all databases, then symlinking it back to /var/lib/mysql

http://forums.cpanel.net/f354/how-move-mysql-data-folder-110481.html#post709306

Of note, you'll want to also stop tailwatchd before doing this so it doesn't try to restart MySQL while you are moving things:

Code:
/usr/local/cpanel/scripts/restartsrv_tailwatchd --stop
After you complete the steps noted in that post, then start tailwatchd again:

Code:
/usr/local/cpanel/scripts/restartsrv_tailwatchd --start
If you do that, you don't have to uncheck MySQL in WHM for monitoring.

Thanks!