I want to run MySQL on Ceph, and I did the follow step to achieve my goal.
(Method one)Using Ceph RBD interface:
- Install MySQL and Ceph
- Deploy Ceph environment, create a Ceph pool and create Ceph RBD device based on Ceph pool
- Mount XFS on RBD device
- Change the MySQL data directory to the directory of RBD device.
(Method two)Using CephFS interface:
- Install MySQL and Ceph
- Deploy Ceph environment, create two Ceph pools and mount CephFS
- Change the MySQL data directory to the directory of CephFS.
And then I achieved the goal of running MySQL on Ceph. I didn’t modify any MySQL codes. Is it that simple ?
I read the librbd.h and libcephfs.h. If I modify the code of MySQL filesystem IO interface, is that any differences between the version of modifying the MySQL or not modifying the MySQL code ?
I thought this question a lot but didn’t figure it out. Hope getting some help. Thanks.