« March 2007 | Main

June 2007 Archives

June 14, 2007

Make MySQL and GFS play nice

So you want to use a GFS shared storage option and have mysql run its databases on that shared storage? Well I had this problem at work and it took a bit to figure out since there wasn't much documentation on it but it works. It is slower then just using it over ext3. I have never tested it on a mysql cluster so I am unsure of the speeds compared to that

So the first thing you want to do is edit your /etc/my.cnf file

in the [mysqld] section you want to add this

skip-innodb

Then in the /etc/init.d/mysql script you want to add --external-locking to the following line so it looks like

/usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --external-locking --pid-file="$mypidfile" --log-error="$errlogfile" >/dev/null 2>&1 &

That is pretty much it.. Now if you want to connect to localhost you need to set a new sock file

so in [mysqld] I do something like this

socket=/var/lib/sock/mysql.sock

and in the [client] section ( create one if one isn't in the cnf file)

socket=/var/lib/sock/mysql.sock

Then

mkdir /var/lib/sock/ chown mysql:mysql /var/lib/sock/

mysql should now run over gfs!

About June 2007

This page contains all entries posted to My Random Blog in June 2007. They are listed from oldest to newest.

March 2007 is the previous archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33