Template:ZRM ZFS snapshot requirements

Version as of 11:23, 20 Apr 2024

to this version.

Return to Version archive.

View current version

MySQL Configuration Requirements

To take advantage of ZFS snapshots, all MySQL data and logs for databases/tables that belong to the backup set. 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


ZRM user "mysql" should have permissions to read and write to the volumes.

Ted: requirement for "mysql" user to read the MySQL database is true for all cases (including snapshots). The directories in which the databases and binary log files are stored should be readable/writeable(?) by "mysql" user.

Pre-conditions for Using ZFS Snapshots

  • The MySQL backup user must be granted sudo privileges to execute ZFS commands on the MySQL server. Add a line similar to the following example to /etc/sudoers on the MySQL server:
mysql ZRMserver.mycompany.com Server>=NOPASSWD:/bin/df,NOPASSWD:/sbin/zfs
where ZRMserver.mycompany.com is the fully-qualified domain name for the ZRM server. Note that if ZFS commands are installed in non-standard locations, the above example would not work without editing it to reflect the different paths.
  • 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.

Refer to the Solaris ZFS documentation for details on ZFS administration.