Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm seeing a huge difference of free disk space between
df -h
enter image description here
and du -sxh /
enter image description here

I've understood in my question Resolving unix server disk space not adding up that du -sxh / is a better estimation as to when I will run out of disk space. Having said that, assuming in my case the above sentence will prove to be wrong and I will soon run out of disk space, what will happen? I assume the MySQL will fail INSERT queries, but other than that, will I just need to delete some files or will it be a problematic situation?

share|improve this question
    
What happens with any task that requires storage space the operation will fail. The operation will continue to fail until the require storage is available –  Ramhound Oct 22 '13 at 11:25

1 Answer 1

up vote 3 down vote accepted

The default storage engine over the years was MyISAM. As of MySQL 5.5, it is now InnoDB.

When it comes to your question, MySQL is a little strange in this aspect because all temporary tables use the MyISAM storage engine.

According to MySQL 5.0 Certification Study Guide,

enter image description here

bulletpoint #11 says the following on Pages 408,409 Section 29.2:

If you run out of disk space while adding rows to a MyISAM table, no error occurs. The server suspends the operation until space becomes available, and then completes the operation.

Given this fact, SQL operations, especially those using temporary tables, do not fail. They simply freeze and wait for disk space to become available. Such operations would fail only if you disconnect the DB Connection.

In that event, the solution would be to free up the diskspace. Then, all moving parts of MySQL that were frozen would thaw out and start moving again.

Perhaps purging old binary logs, dropping old tables, or truncating the error log would help in this aspect.

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.