MySQL Configuration Requirements
To take advantage of ZFS snapshots, all MySQL data and logs must reside on ZFS volumes. The following are some of the possible configurations
- All MySQL data is on a single ZFS Volume
- Specific database directories are on different volumes
- For databases containing InnoDB-based tables, the snapshot can only be used if the database directory, the InnoDB data files and the InnoDB logs are all on ZFS volumes.
- The InnoDB shared data files are on a separate ZFS volume
- The InnoDB logs are on a separate ZFS volume
The ZFS volumes are mounted on ZRM server using NFS. ZRM user "mysql" should have permissions to read and write to the volumes.
Pre-conditions for Using ZFS Snapshots
- The snap reserve for the ZFS volume must be adequate to accommodate changed data. The ZFS default of 20% may be low or high for your site, depending on data change rates.
- To determine the snap reserve, use the ZFS snap reserve volumename command.
- All MySQL database files (data, log, indexes) must be stored in ZFS volumes to ensure consistency.
- If any of the files are not on ZFS volumes, a raw backup using mysqlhotcopy, or a logical backup using mysqldump will be taken based on the storage engines of the tables in each of the databases.