From owner-svn-src-all@freebsd.org Thu Aug 27 13:50:23 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 D63B03B25A1; Thu, 27 Aug 2020 13:50:23 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (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 4BckdC16Thz4dtD; Thu, 27 Aug 2020 13:50:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BIIEkwq27ng7KBIIGk57tA; Thu, 27 Aug 2020 07:50:20 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=y4yBn9ojGxQA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=bIl-2ox-_QApRB5rmloA:9 a=CjuIK1q_8ugA:10 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 58AF216C; Thu, 27 Aug 2020 06:50:18 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RDoGqn055838; Thu, 27 Aug 2020 06:50:16 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271350.07RDoGqn055838@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: <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> Comments: In-reply-to Andriy Gapon message dated "Thu, 27 Aug 2020 11:54:02 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 06:50:16 -0700 X-CMAE-Envelope: MS4wfOJ0aGetAk7Vp1O7f/DECEji61e7MZq2o5qXZC7SPsnCdsf/P/r2xaOP60e6kng9iVKmxAOJ+//mf+Y3Y2W9BUTcKqGkd2BNiRJdjv+6x30JhRN8DYRp a+cC3K5OAi3HrQPa7N1tcd1UATQsBQhhc00ks9EoVgg45fNdpUN7e4McY8PQ6IgJLyDsumDSJi31BGo0claPbAGrQEI+CDrvV/HiesCH3LKPPLjDBjZ7ToVb CZW/s9Pmj90Td5m+V+s/3xFOkUPMbxvs117wAKMxzOkw8w0omDc6CxbynJsqZ3MiwT/JYdf77glCLgKERNyk4A== X-Rspamd-Queue-Id: 4BckdC16Thz4dtD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; REPLY(-4.00)[] 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:50:23 -0000 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. > > > 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 definitions > for migration, but I think that it does not make sense to split pools between > 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.