From owner-freebsd-stable@freebsd.org Fri Apr 17 20:15:48 2020 Return-Path: Delivered-To: freebsd-stable@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 676712C7D36; Fri, 17 Apr 2020 20:15:48 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 493nQq4Sfyz4cd5; Fri, 17 Apr 2020 20:15:47 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1493475A; Fri, 17 Apr 2020 16:15:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 17 Apr 2020 16:15:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm3; bh=I 5DOPajtPdJLr1Ijxwf3nO45bOWxaNJ6kZwdUHpMZrs=; b=ldBChjFnzttkQ4Xra xIfqV6sM3hvXVY/Tttjgncj0R3Nbgf8fQxyni3baZ+9rz72x8tHEWlxyfBCyyyoE IilEtXwwLL3LEmuaLqFzScIN+Gd1O3tgpF7abIowqiGxkOe7XX7KY8RqAjlJLBro EzdK/KQy5W9D28sJhzQyRzXJqBEKLln5EhnuXRCyWFfdpnGWhnyzxfYf49b2pAE5 HfOP8uAlOLQlOpeDh4xZJkX0pgAJ1wRKjytiZZdoub7wE8/sIcdbmpix+JdKsthG +OyEr5CDGTF2OV+2BqB7f7WpA1hHaTGJY99lW3wHBK57T6eRQOXSsllhtd9XTjJJ bqJEg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=I5DOPajtPdJLr1Ijxwf3nO45bOWxaNJ6kZwdUHpMZ rs=; b=GQhwX/fYHVD16GtJ0i+5QaKUOQatwfToeaN5I/jmFumj+LZGIVKyPeo7d RiteIs5wXm166bfjzVDdswFVDZXnxMtcoRMEU0cKUDTEWW92dYkhYUP+ggVzaUku UxgeqVTLEkInipKs20aJ/wHemNSg/ursjq1oKBOXdjE7fNOV6RGSCu0y05zNqf5+ 53YZh5yBl5mIeV3ois1LXx0zTmXsrqUUpCW6tSA0i1UL2n5XzuD2VC+Bb+5y9UTp ONVjK8WrDQimg/0kCNQtNwxNdCLCg2a99n1Os7XjqLAfl44YDQq/TJhP67Ad4pEE hUUDjZxRlsFVSOekTPAFo9ILZmAcg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfeejgddugeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegtggfuhfgjfffgkfhfvffosehtqh hmtdhhtdejnecuhfhrohhmpefutghothhtucfnohhnghcuoehstghothhtlhesshgrmhhs tghordhorhhgqeenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucfkphepkedrge eirdekledrvddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehstghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 3D8A13280069; Fri, 17 Apr 2020 16:15:45 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: OpenZFS port updated From: Scott Long In-Reply-To: Date: Fri, 17 Apr 2020 14:15:44 -0600 Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6333818E-63DA-4851-8496-9B0CE82145A3@samsco.org> References: To: Ryan Moeller X-Mailer: Apple Mail (2.3601.0.10) X-Rspamd-Queue-Id: 493nQq4Sfyz4cd5 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm3 header.b=ldBChjFn; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=GQhwX/fY; dmarc=none; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-5.60 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm3,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; DMARC_NA(0.00)[samsco.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-3.50)[ip: (-9.86), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.69), country: US(-0.05)]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[21.123.147.64.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 20:15:48 -0000 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 = 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"