> ## Content Index
> Fetch the complete content index at: https://ostreff.info/llms.txt
> Use this file to discover other available public pages before exploring further.

# MySQL om ZFS
- URL: https://ostreff.info/mysql-om-zfs/
- Published: 2023-07-05T19:55:23.000Z
- Updated: 2023-07-05T19:57:24.000Z
- Author: Jordan Ostreff
- Tags: MySQL, ZFS

It's highly recommended to provide special containers for [MySQL](https://www.mysql.com/?ref=ostreff.info) logs and database. Personally I'm doing somethink like this, just before start database for the first time:

```
zfs create zroot/var/mysql-db ; \
zfs create zroot/var/mysql-log ; \
zfs set recordsize=16k zroot/var/mysql-db ; \
zfs set atime=off zroot/var/mysql-db ; \
zfs set compression=off zroot/var/mysql-db ; \
zfs set mountpoint=/var/db/mysql zroot/var/mysql-db ; \
zfs set mountpoint=/var/log/mysql zroot/var/mysql-log ; 
```

Don't forget to also include following 2 [mysql](https://mariadb.com/?ref=ostreff.info) options

```
# innodb_doublewrite            = 0
# innodb_flush_method           = O_DSYNC
```