Well, this has been a long Saturday morning. MySQL was throwing an error when dumping backups. That error was...
mysqldump: Error 1030: Got error 5 from storage engine when dumping table mytable
at row: XXXXXXXX
This is a MyISAM table with 300 million rows of data. It's become corrupt in the past, and MySQL repair would always resolve the issue. Aside from the error during mysqldump, the data appeared normally on the production site.
I assumed it was a similar issue to before, and the table needed to be repaired. The repair command ended unusually fast with the result...
database.mytable repair warning Number of rows changed from 303970410 to 22082981
database.mytable repair Error Error reading file './database/mytable.MYD' ...
database.mytable repair status OK
And just like that, 93% of the data was gone, with the MYD and MYI files replaced. Any idea what might have went wrong here? Any chance of recovering data? I'm assuming no, and I'll have to go with the most recent valid backup, but I'm scratching my head. Appreciate any help.
Edit:
MySQL 5.1.73 CentOS 6.5