Harassed by MySQL’s binary logs

I developed a web-based app for a client to store huge amounts of PDF data - we setup a 1.2TB drive for the purpose. Recently, the drive became full. Prematurely.

Database statistics showed that the PDF table was only 400GB in size - so where was the rest of our data going? As with most tech issues, the problem was only solved when the heat was on - unable to gracefully restart the database (because we upgraded the Gentoo init script), we had to kill the process.

Resulting in corruption.

On a 400GB database.

Which couldn’t repair itself, since the myisamcheck functions require free space to make a backup copy, before making any changes. Aaarg!

A bit of research brought the answer.. we had the “log-bin” entry in “my.cnf”. This told MySQL:

“Create a binary log of every insert we’ve ever done. Since we haven’t specified a filename, use the server’s hostname, followed by “-bin” and a number”

I zapped the 600GB of 10GB-sized data-bin files, and restarted myisamcheck. Hopefully it’ll be finished before lunch!

Trackback URL

, ,

No Comments on "Harassed by MySQL’s binary logs"

Hi Stranger, leave a comment:

ALLOWED XHTML TAGS:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to Comments