2

I am running in a problem here I have a linux instance running on EC2. All was working fine till last night. Today morning it showed me some error stating that there was no disk space to write of mysql.

So I tried to stop and start mysql server. Stopping worked fine, but when i start with following command

sudo /etc/init.d/mysql start

It is showing me the error

ERROR: The partition with /var/lib/mysql is too full!
Decado
  • 1,949
  • 11
  • 17
jimy
  • 177
  • 2
  • 3
  • 8

3 Answers3

3

Check your disk space usage.

sudo df -h

You can mount large database to another partition through binding.

bind is a mount option to mount directories inside directories.

Suku
  • 2,036
  • 13
  • 15
  • i did sudo df -h and get /dev/sda1 usage 100% so how to clean that??? – jimy Apr 07 '11 at 06:56
  • Paste the output of sudo fdisk -l and sudo df -h here. – Suku Apr 07 '11 at 07:02
  • @jimy - you have two options: 1) detete something you don't want. Take a look to logs in /var/log/, temporary files in /tmp and /var/tmp. 2) extend /dev/sda1 partition. Since you are on EC2 it should not be that hard. Method how to do it depends on storage you are using (EBS/non-EBS) and filesystem type. – rvs Apr 07 '11 at 09:58
2

sounds like your disk is full, your probably going to need to clean out log files or make your disk larger, without knowing the finer details of your partition setup i cant advise but you may be able to mount an EBS volume on to your server and move your /var/lib/mysql folder into it then remount that volume under /var/lib/mysql and restart mysql.

once its working you should be able carry on as normal until that drive gets full

anthonysomerset
  • 4,233
  • 2
  • 21
  • 24
1

Run: sudo apt-get clean and restart MySQL process

$ sudo apt-get clean
$ sudo /etc/init.d/mysql start
tachomi
  • 255
  • 3
  • 11