mysql ibdata1 – Where has my disk space gone?

So - here we are - arrive to desk with monitoring screaming about a mySQL server running out of disk space. No, its not local backups failing to be reaped - damn - quick fix gone. Logs - hmmm - under control. Clear out apt's cached files - still nope. Hmmm - where is it all going? Tmp? No. Oh. Apparently its in /var/lib/mysql . Mysql is consuming it all. Expecting to see a user with a vast database, closer inspection shows it is not a specific user - it is the service itself... more specifically again... ibdata1 at 190GB. Ouf! Well I cannot delete that?! Maybe there is some way to reduce the size of this, make it smaller, compress, shrink, anything?

ibdata1 is related to the use of innodb as opposed my myISAM.

Here is the nice document they have on managing ibdata1 over at .


So the 'solution' is to essentially back everything up. Delete all the databases. Stop the service. Delete the file. Start the service. Reimport all of the databases.

Well doesn't that sound like a dream. What could POSSIBLY go wrong?

Equally limiting size and one per DB is an option to move forwards with it would seem.

The wonders of running a *cough* slightly older version of mySQL within a heavily used space.

I will mostly be choosing a rock or hard place over the next few days.

Leave a Reply

Your email address will not be published. Required fields are marked *