Need some further understanding of MariaDB/MySQL on ZFS
Morgan Wesström
freebsd-database at pp.dyndns.biz
Tue Nov 22 22:44:54 UTC 2016
Hi list, first time poster here but long time FreeBSD user.
I'm migrating my FreeBSD based home router to FreeBSD 11 and ZFS on
root. This also includes moving my MariaDB databases to ZFS. I've
studied the wiki guide as well as several other sources on this subject
and I understand the complex interaction between ZFS and the internal
InnoDB and MyISAM database structures.
I've created the following datasets:
zroot/var/db/mysql
recordsize=8K
mount point /var/db/mysql
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
My my.cnf contains (among others) these lines to move InnoDB databases
to the correct folders:
innodb_data_home_dir = /var/db/mysql/innodb
innodb_log_group_home_dir = /var/db/mysql/innodb/logs
When I start the server the first time the InnoDB folders are correctly
populated with some default files like innodb/ibdata1 and
innodb/logs/ib_logfile0. But as soon as I create a new database (foo)
with InnoDB tables, the server creates a /var/db/mysql/foo folder and
populates it with ibd and frm files whereas I would've expected it to
create it as /var/db/mysql/innodb/foo to inherit the correct 16K recordsize.
Is this correct? Shouldn't it be created under /var/db/mysql/innodb?
Have I missed some vital configuration option?
Kind Regards
Morgan Wesström
More information about the freebsd-database
mailing list