Search code examples
mysqldatabaseinnodblvm

How to setting up MySQL Master-Slave Replication with LVM snapshots


There are multiple ways to take a MySQL replication, or rebuilding it. How can we build master-slave replications via LVM snapshot?

And also which is the most effective way among below 4 choices & why ??

  • Setting up MySQL Replication using mysqldump.

  • Setting up MySQL Replication using Percona XtraBackup.

  • Setting up MySQL Replication using Rsync.

  • setting up MySQL Master-Slave Replication with LVM snapshots.

Solution

  • Since setting up LVM requires major surgery at the filesystem level, that approach could be a challenge. However, once it is done, the rest is relatively painless.

    XtraBackup is an improvement on mysqldump.

    rsync is good for copying files that are not being modified. When MySQL is running, it is modifying files, and caching unwritten stuff in ram. Sounds sketchy.