Free up disk space

Originally I was troubleshooting a mysql issue
I couldn’t get to my linpha site. I tried to restart mysql
suse11:/var/log # service mysql restart
checkproc: Empty pid file /var/lib/mysql/ for /usr/sbin/mysqld

suse11:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 16271208 15492804 0 100% /
udev 360152 112 360040 1% /dev
/dev/sda3 24254124 396032 22625908 2% /home

I tried clearing out /var/log manually deleting those file through WinSCP
but it’s not freeing up any space on /dev/sda2

I’m assuming /dev/sda2 being at 100% used is causing mysql issues.
How do I free up some space?

The du command should help you locate which are the big directories;

su -
cd /
du -h -d 1

Possibly /var and /tmp are two to check.

If you are making extensive use of mysql, it may be worth putting /var on a separate partition.

Yes, MySQL has the habit to put the complet database in */var *by default. :frowning:

You can put it elsewhere and then MySQL will provide the symlinks to it. I use the DATA DIRECTORY = and INDEX DIRECTORY = clauses in the CREATE TABLE statement for this.