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 had some mysql problems yesterday. I got "Too many connections" error on my sites because one of my script went a little bit crazy. After I fixed the connection problems I still got an error in mysql log.

/usr/sbin/mysqld: Disk is full writing

I checked my disk usage with "df -h" and I got this result:

Filesystem Size Used Avail Use% Mounted on

/dev/xvda1 3.0G 2.9G 0 100% /

none 530M 132K 530M 1% /dev

none 549M 0 549M 0% /dev/shm

none 549M 52K 549M 1% /var/run

none 549M 0 549M 0% /var/lock

So my "/dev/xvda1" file is full. I have no idea what this file doing, im really beginner on linux systems. My question is what should I do with it? Delete it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you delete that "file" you will be erasing your disk. /dev/xda1 is the the logical path that refers to your hard drive.

First of all check /var/log to see how big it is (go to the folder and do du -sh). Erase (extract first to another machine if you need them later) the logs of mysql if they are too big. My guess is your "crazy script" filled up your logs.

share|improve this answer
    
Thank you for your fast answer Lucas, /var/log uses 971M I checked the biggest files in it. rewrite.log - 144M rewrite.log.1 - 641M Should I erase them? –  martincpt Dec 7 '12 at 8:00
    
if there isn't anything in them you need, you can null them –  Lucas Kauffman Dec 7 '12 at 8:32
    
Awesome thanks! It seems everything is working fine now. Have a nice day! –  martincpt Dec 7 '12 at 8:47
    
Running a vm with 3GB diskspace is risky if you don't have proper logrotation rules in place. I would suggest that you read up on log rotation and keep log files for no more than 7 days, depending on your requirements. –  Danie Dec 7 '12 at 8:49
    
@Danie Thanks for your advice, I'll look around. –  martincpt Dec 7 '12 at 12:11

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.