Can disk space be the reason for a server crash?
After looking into the MySQL error file, I found an error regarding disk space. Now I think its the reason for MySQL crashing:
[root@xxxx ~]# cat /var/lib/mysql/xxxx.com.err
120528 17:45:05 [Note] Crash recovery finished.
/usr/sbin/mysqld: Disk is full writing './mysql-bin.~rec~' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)
Could this be the reason behind the crashes?
Yes, disk space can cause a system crash. It's a dangerous situation that should be avoided. Processes can run out of space, log files can fill up, etc. Certain applications and daemons (e.g MySQL) will halt or crash if they run out of disk space.
In your case, it seems like your system doesn't have any partitions. You should provide the output of df -h
to start...
From there, you may want to see which directories are consuming the greatest amount of space:
du -skh /*
should provide an accounting of which top-level directories are the largest. I prefer the ncdu utility for this, but you can't expect that to be installed on most systems.
With du -skh /*
, you'll get an output like this:
[root@xx /]# du -skh /*
8.4M /bin
37M /boot
124K /dev
110M /etc
192K /home
.
.
.
5.8G /usr
3.7G /var
41G /yum
If you wanted to drill down into /var
, for instance, cd /var
and run du -skh *
and look for the largest consumers of space... But of course, the process of discovering this has been covered numerous times on this site. Check these related questions for more suggestions:
How does one find which files are taking up 80% of the space on a Linux webserver?
How do I find out what is using up all the space on my / partition?
Disk usage treemap software for headless Linux
It's certainly a place to start. Try finding what is filling your /
partition and remove some files and see what happens
find / -xdev -maxdepth 1 -exec du -sh {} \;
will help you find out which directory tree is filling the disk.
Yes, according to your MySQL error log it is the reason of crash. You may want to empty log files to free up some space or move the MySQL data directory to some other directory.
Error code 28 represents "No space left on device"