Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!
share|improve this question
    
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
2  
we'll be running out of space if you keep duplicating your posts! –  Chopper3 Apr 7 '11 at 9:41

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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