Can I run mysqld on top of glusterfs?

Due to a reasonably long delay with no answers, I have found out by trial and error.

The answer is : Yes, I can run mysqld on top of glusterfs.

I set this up on Ubuntu and briefly here are the steps:

  • Install Ubuntu
  • Install and configure glusterfs
  • Install mysql-server
  • Configure /etc/mysql/my.cnf to set datadir /mnt/glusterfs instead of /var/lib/mysql
  • Set up the databases
  • Configure AppAmor to allow the above to work (or disable appamor )

The real problem comes in how MySQL handles locks.

However you can pass all of this off to glusterfs to handle so that many mysqld processes (running on separate nodes) can access the same database files on /mnt/glusterfs. You need to read this carefully.

  • Disable the query cache, switch on external locking and disable delays to writing.

Leave a Comment