Moved to Rackspace Cloud

A couple of days ago, I encountered a database corruption. One sentence: My access log grew so huge it took up 100% of the disk space; MySQL can no longer write the database files and a few tables got corrupted.

Okay I cheated on the one sentence.

Rackspace Cloud has similar build as Slicehost (my previous host). I moved a few of my blogs over. Currently Slicehost is like an expensive DNS server. That said, Rackspace Cloud is cheaper than Slicehost. Slicehost is a subsidiary of Rackspace. Well anyway, if you do like to use Rackspace and would like to make my day, use my referrer code ‘REF-KW’ without quotations. It gives me some rebate, I think.

How to repair MySQL tables

There are generally 2 ways of repairing MySQL tables using the command line. First is to use “mysqlcheck“, the other is to use “myisamchk” (only for MyISAM). This is more for my own information.

This has been tested on Ubuntu 9.10 with MySQL 5

mysqlcheck

This is how you can check if your database tables are fine:

[code lang=”bash”]mysqlcheck -uUsername -pSecret –all-databases[/code]

Change “Username” to your username and “Secret” to your password.

To repair them, use:

[code lang=”bash”]mysqlcheck -uUsername -pSecret –all-databases –auto-repair[/code]

This requires of your MySQL daemon to be running. If it isn’t running use this to start:

[code lang=”bash”]sudo /etc/init.d/mysql start[/code]

myisamchk

If you have trouble running ‘mysqlcheck’, you can consider using ‘myisamchk’ instead if your tables are MyISAM. This command can be performed without MySQL daemon running. This fixes the data in your file system directly and this has saved me once.

[code lang=”bash”]sudo myisamchk –max-record-length=1048576 -o -f /var/lib/mysql/db_name/table_name.MYI[/code]

Change “db_name” to your database name and “table_name” to the name of the table you wish to repair.

Ma.gnolia.com experience data loss and corruption

Ma.gnolia.com experience data loss and corruption and the service is thus disrupted. I wonder if there are any backups. Seems like it just crashed and recovery is going to be hard.

Dear Ma.gnolia Community Members or Visitor,

Early on the West-coast morning of Friday, January 30th, Ma.gnolia experienced every web service’s worst nightmare: data corruption and loss. For Ma.gnolia, this means that the service is offline and members’ bookmarks are unavailable, both through the website itself and the API. As I evaluate recovery options, I can’t provide a certain timeline or prognosis as to to when or to what degree Ma.gnolia or your bookmarks will return; only that this process will take days, not hours.

I will of course keep you appraised here and in our Twitter account.

Most importantly, I apologize to all of you who have made Ma.gnolia a home for your bookmarks and community. I know that many of you rely on Ma.gnolia in your day to day work and play flow to safely host you bookmarks, keeping them available around the clock, and that this is a difficult disruption.

Sincerely,
Larry

I would be very upset if delicious is gone.