From owner-freebsd-current@freebsd.org Sat Apr 18 06:27:33 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4111F2BE1EF; Sat, 18 Apr 2020 06:27:33 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49430h6nssz4bT9; Sat, 18 Apr 2020 06:27:32 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 03I6RUjk053805; Fri, 17 Apr 2020 23:27:30 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 03I6RUbc053804; Fri, 17 Apr 2020 23:27:30 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202004180627.03I6RUbc053804@gndrsh.dnsmgr.net> Subject: Re: OpenZFS port updated In-Reply-To: To: Ryan Moeller Date: Fri, 17 Apr 2020 23:27:30 -0700 (PDT) CC: freebsd-current@freebsd.org, freebsd-stable@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49430h6nssz4bT9 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2020 06:27:33 -0000 > FreeBSD support has been merged into the master branch of the openzfs/zfs repository, and the FreeBSD ports have been switched to this branch. > > OpenZFS brings many exciting features to FreeBSD, including: > * native encryption > * improved TRIM implementation > * most recently, persistent L2ARC > > Of course, avoid upgrading your pools if you want to keep the option to go back to the base ZFS. Has anyone published a set of pool options vs *ZFS implementations so one can figure out least common denomitator set of options when creating cross system pools, as the trial and error method is a royal pain. > > OpenZFS can be installed alongside the base ZFS. Change your loader.conf entry to openzfs_load=?YES? 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. > > The FreeBSD loader can boot from pools with the encryption feature enabled, but the root/bootenv datasets must not be encrypted themselves. > > The FreeBSD platform support in OpenZFS does not yet include all features present in FreeBSD?s ZFS. Some notable changes/missing features include: > * many sysctl names have changed (legacy compat sysctls should be added at some point) > * zfs send progress reporting in process title via setproctitle > * extended 'zfs holds -r' (https://svnweb.freebsd.org/base?view=revision&revision=290015) > * vdev ashift optimizations (https://svnweb.freebsd.org/base?view=revision&revision=254591) > * pre-mountroot zpool.cache loading (for automatic pool imports) > > 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. > > 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: I am not so keen on the idea of "cache" data living in /boot, but I suppose /boot is already tainted with per machine data that should of lived someplace else. > 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() > > 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 > > This will probably not be needed long-term. It is not necessary if the boot pool is the only pool. > > Happy testing :) > > - 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" > > -- Rod Grimes rgrimes@freebsd.org