SQL: SOS: MySQL indexes overloads disk
I am glad you mentioned the table was MyISAM.

You can now run this

OPTIMIZE TABLE mytable;


on the 14.8G table.

So why did you get #1030 - Got error 28 from storage engine ?

It wasn't so much the indexes in themselves. Sometimes, a temp table may need to be written to disk. If there is no space for the temp table on disk, mysqld will not crash. It will freeze until space becomes available. I wrote about this before:


Apr 05, 2013 : &quot;Site Offline&quot; MySQL server failing to start and stop
Mar 15, 2012 : Why do MySQL tables crash? How do I prevent it?


If you want to compress every table regardless of storage engine, run this code in a script

MYSQL_USER=root
MYSQL_PASS=password
MYSQL_CONN="-u${MYSQL_USER} -p ${MYSQL_PASS}"
echo "SET SQL_LOG_BIN = 0;" &gt; /tmp/CompressTables.sql
SQL="SELECT CONCAT('OPTIMIZE TABLE ',table_schema,'.',table_name,';')"
SQL="${SQL} FROM information_schema.tables WHERE table_schema NOT IN')"
SQL="${SQL} ('information_schema','mysql','performance_schema')"
mysql ${MYSQL_CONN} -ANe"${SQL}" &gt; /tmp/CompressTables.sql
less /tmp/CompressTables.sql


If the file looks good to you, run this

mysql ${MYSQL_CONN} -A &lt; /tmp/CompressTables.sql


If all your tables are huge, run this over the weekend