From owner-freebsd-current@freebsd.org Fri Apr 17 22:12:07 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 B22962AD7C5; Fri, 17 Apr 2020 22:12:07 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 493r134MhGz3N96; Fri, 17 Apr 2020 22:12:07 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 5A7F81171B; Fri, 17 Apr 2020 22:12:07 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-lf1-f42.google.com with SMTP id w145so3054736lff.3; Fri, 17 Apr 2020 15:12:07 -0700 (PDT) X-Gm-Message-State: AGi0PubQFsc0rTSk1oHuxbshJiwDEEt5Xg7vuQzCqlghmKi+y7xvcdAk DBHrOKKDrxI+05pNkiQrCysOfZbWvXUdieOQZ1w= X-Google-Smtp-Source: APiQypLnNI/LTN5vPsgpaQ8E77N++Wun83bLgFb5pPilrKLNPrBEmTJ7d9CAzUMoJUwJqt7LkyHIvehohYZYhdQdxgI= X-Received: by 2002:a19:c602:: with SMTP id w2mr211775lff.74.1587161525910; Fri, 17 Apr 2020 15:12:05 -0700 (PDT) MIME-Version: 1.0 References: <6333818E-63DA-4851-8496-9B0CE82145A3@samsco.org> In-Reply-To: <6333818E-63DA-4851-8496-9B0CE82145A3@samsco.org> From: Matthew Macy Date: Fri, 17 Apr 2020 15:11:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: OpenZFS port updated To: Scott Long Cc: Ryan Moeller , freebsd-current , freebsd-stable@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Fri, 17 Apr 2020 22:12:07 -0000 On Fri, Apr 17, 2020 at 1:16 PM Scott Long wrote: > > Is the intention to eventually replace the zfs code in src/ ? Yes. Once the feature gap is filled in and most of the potential POLA violations are fixed. > What will be the long-term relationship between src/ and ports/ for this? OpenZFS users on 12 will use the port indefinitely. HEAD will presumably be updated whenever a point release is created upstream. Ultimately I can see two versions of the port, one that tracks master for HEAD and 12 and one that tracks only the latest release for 12 users. -M > > Scott > > > > On Apr 17, 2020, at 12:35 PM, Ryan Moeller wrote= : > > > > FreeBSD support has been merged into the master branch of the openzfs/z= fs 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. > > > > OpenZFS can be installed alongside the base ZFS. Change your loader.con= f 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. Th= e 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 enab= led, but the root/bootenv datasets must not be encrypted themselves. > > > > The FreeBSD platform support in OpenZFS does not yet include all featur= es 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) > > * zfs send progress reporting in process title via setproctitle > > * extended 'zfs holds -r' (https://svnweb.freebsd.org/base?view=3Drevis= ion&revision=3D290015) > > * vdev ashift optimizations (https://svnweb.freebsd.org/base?view=3Drev= ision&revision=3D254591) > > * 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/zpoo= l.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: > > > > 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.o= rg" > > _______________________________________________ > 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= "