Need some further understanding of MariaDB/MySQL on ZFS

Miroslav Lachman 000.fbsd at quip.cz
Wed Nov 23 08:50:20 UTC 2016


Miroslav Lachman wrote on 2016/11/23 09:35:

> If you have innodb_file_per_table On, then all tables data are stored in
> /var/db/mysql/databasename/ and only internal InnoDB data are stored in
> /var/db/mysql/innodb/ib_data
>
> https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_data_home_dir
>
>
> The common part of the directory path for all InnoDB data files in the
> *system tablespace*. This setting _does not affect the location of
> file-per-table tablespaces when innodb_file_per_table is enabled_. The
> default value is the MySQL data directory. If you specify the value as
> an empty string, you can use absolute file paths in innodb_data_file_path.

Just to say more - if you need file-per-table, then you can use 16K for 
/var/db/mysql too (and then you don't need separate /var/db/mysql/innodb)

zroot/var/db/mysql
recordsize=16K
mount point /var/db/mysql

* optional
zroot/var/db/mysql/innodb
recordsize=16K
mount point /var/db/mysql/innodb

zroot/var/db/mysql/innodb/logs
recordsize=128K
mount point /var/db/mysql/innodb/logs


Or you can use your setup and set innodb_file_per_table = off in you my.cnf.

Miroslav Lachman



More information about the freebsd-database mailing list