Date: Fri, 17 Apr 2020 14:15:44 -0600 From: Scott Long <scottl@samsco.org> To: Ryan Moeller <freqlabs@FreeBSD.org> Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: Re: OpenZFS port updated Message-ID: <6333818E-63DA-4851-8496-9B0CE82145A3@samsco.org> In-Reply-To: <A61E33DF-96D0-449D-8665-9089599F0583@FreeBSD.org> References: <A61E33DF-96D0-449D-8665-9089599F0583@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Is the intention to eventually replace the zfs code in src/ ? What will = be the long-term relationship between src/ and ports/ for this? Scott > On Apr 17, 2020, at 12:35 PM, Ryan Moeller <freqlabs@FreeBSD.org> = wrote: >=20 > FreeBSD support has been merged into the master branch of the = openzfs/zfs repository, and the FreeBSD ports have been switched to this = branch. >=20 > OpenZFS brings many exciting features to FreeBSD, including: > * native encryption > * improved TRIM implementation > * most recently, persistent L2ARC >=20 > Of course, avoid upgrading your pools if you want to keep the option = to go back to the base ZFS. >=20 > OpenZFS can be installed alongside the base ZFS. Change your = loader.conf entry to openzfs_load=3D=E2=80=9CYES=E2=80=9D to load the = OpenZFS module at boot, and set PATH to find the tools in = /usr/local/sbin before /sbin. The base zfs tools are still basically = functional with the OpenZFS module, so changing PATH in rc is not = strictly necessary. >=20 > The FreeBSD loader can boot from pools with the encryption feature = enabled, but the root/bootenv datasets must not be encrypted themselves. >=20 > The FreeBSD platform support in OpenZFS does not yet include all = features present in FreeBSD=E2=80=99s ZFS. Some notable changes/missing = features include: > * many sysctl names have changed (legacy compat sysctls should be = added at some point)=20 > * zfs send progress reporting in process title via setproctitle > * extended 'zfs holds -r' = (https://svnweb.freebsd.org/base?view=3Drevision&revision=3D290015) > * vdev ashift optimizations = (https://svnweb.freebsd.org/base?view=3Drevision&revision=3D254591) > * pre-mountroot zpool.cache loading (for automatic pool imports) >=20 > To the last point, this mainly effects the case where / is on ZFS and = /boot is not or is on a different pool. OpenZFS cannot handle this case = yet, but work is in progress to cover that use case. Booting directly = from ZFS does work. >=20 > If there are pools that need to be imported at boot other than the = boot pool, OpenZFS does not automatically import yet, and it uses = /etc/zfs/zpool.cache rather than /boot/zfs/zpool.cache to keep track of = imported pools. To ensure all pool imports occur automatically, a = simple edit to /etc/rc.d/zfs will suffice: >=20 > diff --git a/libexec/rc/rc.d/zfs b/libexec/rc/rc.d/zfs > index 2d35f9b5464..8e4aef0b1b3 100755 > --- a/libexec/rc/rc.d/zfs > +++ b/libexec/rc/rc.d/zfs > @@ -25,6 +25,13 @@ zfs_start_jail() >=20 > zfs_start_main() > { > + local cachefile > + > + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do > + if [ -f $cachefile ]; then > + zpool import -c $cachefile -a > + fi > + done > zfs mount -va > zfs share -a > if [ ! -r /etc/zfs/exports ]; then >=20 > This will probably not be needed long-term. It is not necessary if the = boot pool is the only pool. >=20 > Happy testing :) >=20 > - Ryan > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6333818E-63DA-4851-8496-9B0CE82145A3>