From owner-svn-src-all@freebsd.org Thu Aug 27 13:54:34 2020 Return-Path: Delivered-To: svn-src-all@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 2FB963B29C8; Thu, 27 Aug 2020 13:54:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bckk04kmMz4fNj; Thu, 27 Aug 2020 13:54:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BIMHkYwsS695cBIMJkPRxo; Thu, 27 Aug 2020 07:54:31 -0600 X-Authority-Analysis: v=2.3 cv=fZA2N3YF c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=BHo-iyq49Ao6tAWaz-oA:9 a=CjuIK1q_8ugA:10 a=2Q2bHuj3vkAA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 84CA01C1; Thu, 27 Aug 2020 06:54:29 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RDsTeW084744; Thu, 27 Aug 2020 06:54:29 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271354.07RDsTeW084744@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andriy Gapon cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r364817 - head/libexec/rc/rc.d In-reply-to: <202008271350.07RDoGqn055838@slippy.cwsent.com> References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 27 Aug 2020 06:50:16 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 06:54:29 -0700 X-CMAE-Envelope: MS4wfETUKaKvp5rGlPB4NdPS0RZuUx0vqXg1CTEnzsUTzM8URlbqFbRs8u4Yd8pU1pgv6Mtp8PKOOI85a+VT1RFDt2XpeGGCUu540tHtlBWIMpZg1mETSPqS tdzCt16s5VMj6eu1SaPWV5Hk1rzqbr94GT4O9XjBfDbqcqaMj4+Lgir/mnQNG2iPlYFWtFbcYqdJSA7VrhcMd9RbeyGT4UlY0kyxPtRiaSjnutsq+iyOhUVW vmed8oyZ7UfzpUzbNtxSbGoisL0rJ3O9dnWI0auqFSkbnRjW/5ZnSsGY/Vn9NqWLp4zSYFeN+TCxqePmbl4xwg== X-Rspamd-Queue-Id: 4Bckk04kmMz4fNj X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.137) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [1.67 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; ARC_NA(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.09)[-0.090]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.27)[0.269]; NEURAL_SPAM_MEDIUM(0.19)[0.195]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.137:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 13:54:34 -0000 In message <202008271350.07RDoGqn055838@slippy.cwsent.com>, Cy Schubert writes: > In message <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org>, Andriy Gapon > wri > tes: > > On 26/08/2020 16:13, Cy Schubert wrote: > > > Author: cy > > > Date: Wed Aug 26 13:13:57 2020 > > > New Revision: 364817 > > > URL: https://svnweb.freebsd.org/changeset/base/364817 > > > > > > Log: > > > As of r364746 (OpenZFS import) existing ZPOOLs are not imported > > > prior to zvol and mountcritlocal resulting in ZVOLs (swap and > > > > I probably missed some discussion, so I am curious why that is. > > This is because r364746 added the code below to rc.d/zfs and by then it was > too late. I simply moved it to a new file that allowed rc.d/zvol and > rc.d/mountcritlocal with legacy mounts to work again. This was copied from > rc.d/zfs, which was added by r364746. There was no need for a zpool import > under the previous version of ZFS, whereas it appears that OpenZFS requires > it. Let me add, one could say this is a regression. > > > > > > virtual machine UFS filesystems) being unavailable, leading to > > > boot failures. > > > We move the zpool import from zfs to a new zpool script, with the > > > -N option to avoid mounting datasets while making the ZPOOL's > > > datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs > > > available for subsequent use for swap (in the zvol rc sript) or > > > for UFS or other filesystems in fstab(5), mounted by mountcritlocal. > > > > > > Reviewed by: freqlabs (previous version) > > > Differential Revision: https://reviews.freebsd.org/D26185 > > > > > > Added: > > > head/libexec/rc/rc.d/zpool (contents, props changed) > > [snip] > > > +zpool_start() > > > +{ > > > + local cachefile > > > + > > > + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do > > > + if [ -r $cachefile ]; then > > > + zpool import -c $cachefile -a -N > > > > I would add a break here, so that pools are imported either from one cache > fi > > le > > or the other but not both. It makes sense to have two cache file definitio > ns > > for migration, but I think that it does not make sense to split pools betwe > en > > the cache files. > > Agreed. > > > > > > + fi > > > + done > > > +} > > > > > > -- > > Andriy Gapon -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.