# ZFS settings are inherited inside of Jail?



## wisdown (Aug 25, 2015)

Guys,

Someone know if the settings from Host are inherited inside of Jail?

For example, in the Host I have make an dataset like:

`zfs create -o compression=off -o exec=off -o recordsize=16k -o setuid=off zroot/var/db/mysql`

My concern is about the recordsize, since I dont know how to check it inside of the Jail, my question is if the recordize will be same (16K) inside of the Jail?

Thanks in advice!!!


----------



## junovitch@ (Aug 26, 2015)

Most likely a no based on what you've shown but it would help to have more information on how you manage your jails.  With something like sysutils/iocage the ZFS properties would all be on zroot/iocage/jails/<jail UUID> and with sysutils/ezjail it would be under zroot/ezjail/<jailname>.  You would have to set properties under those rather than on the host for it to take effect.


----------



## wisdown (Aug 26, 2015)

Thanks for the reply junovitch@!!!

On my scenario I have one server running FreeBSD 10.1 with 2 jails runing bind, 1 bind as Authoritative (DNSSEC enabled and working) and 1 as Forwarder. And another Virtual Machine with FreeBSD 10.2 runing NTP Server.

For single patchs / updates usually I mount the ports inside jails using:

`mount_nullfs /usr/ports /usr/jails/ns1/usr/ports`
`mount_nullfs /usr/ports /usr/jails/ns2/usr/ports`

Then I do the backup of configuration files renaming for .old, .bkp, etc...
Then I remove previous version from bind and install the new ones, then I replace the default config files from fresh install to ones in backup.

For release like 10.2 I was planning do:

First the backup of config files.

`make buildworld`
`make installworld DESTDIR=/usr/jails/ns1`
`make installworld DESTDIR=/usr/jails/ns2`
`make distribution DESTDIR=/usr/jails/ns1`
`make distribution DESTDIR=/usr/jails/ns2`

Then the normal install like single patches and restoring the config files.

Now, I am trying discard this virtual machine with bind and make another two with only one jail.

So one Virtual Machine with an Jail for Authoritative Server, another Virtual Machine for DNS forwarder jailed.

For the new dedicated Authoritative Server, this time I will try setup using DLZ with databases/mysql56-server as database for dynamic updates, and the note about recordsize was in the Oracle blog about Best Practices to MySQL:

Best Practices MySQL and ZFS

The idea is moving away from my Linux free host panel (ISPConfig) to an full FreeBSD servers and try develop some web interface allowing clients manage they DNS data instead open an ticket for me do it (The reason for start test the DLZ) and same for mail and web files, gonna be an long journey and I am trying understand all risks on the way before start change everything.

From your advice seems sysutils/iocage be able to let me set the recordsize, at least this is what I understand reading on they page this:

Dedicated ZFS datasets inside jails

And there other features like manage ZFS Quotas, this one I was worried about how works inside Jails, but, trying do one thing per time, currently install the stuff for see how works (for example I have learned NTP server doesn't works inside of Jails).

I'm going to make some tests how this exactly works and then I will back to share my findings


----------

