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!
  • We're probably going to need some more information. Is /var/lib/mysql an ebs backed volume or ephemeral storage? – Decado Apr 7 '11 at 6:50
  • I am new to linux can you explain me more what you need to know??? – jimy Apr 7 '11 at 6:57
  • 3
    we'll be running out of space if you keep duplicating your posts! – Chopper3 Apr 7 '11 at 9:41

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.

  • i did sudo df -h and get /dev/sda1 usage 100% so how to clean that??? – jimy Apr 7 '11 at 6:56
  • Paste the output of sudo fdisk -l and sudo df -h here. – Suku Apr 7 '11 at 7: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 7 '11 at 9:58

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


Run: sudo apt-get clean and restart MySQL process

$ sudo apt-get clean
$ sudo /etc/init.d/mysql start

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.