From owner-svn-src-all@freebsd.org Thu Aug 27 14:03:35 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 0FB923B38E8; Thu, 27 Aug 2020 14:03:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (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 4BckwP6sm4z3S6F; Thu, 27 Aug 2020 14:03:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id BIV1kYzcu695cBIV2kPTaZ; Thu, 27 Aug 2020 08:03:32 -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=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=REGUHbn5vBxifwaQ5q0A:9 a=CjuIK1q_8ugA:10 a=wak2c0yCqP4A:10 a=2Q2bHuj3vkAA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id AD29F1E3; Thu, 27 Aug 2020 07:03:30 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 07RE3U56090900; Thu, 27 Aug 2020 07:03:30 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202008271403.07RE3U56090900@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: Cy Schubert cc: Andriy Gapon , 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: <202008271354.07RDsTeW084744@slippy.cwsent.com> References: <202008261313.07QDDwRm040119@repo.freebsd.org> <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org> <202008271350.07RDoGqn055838@slippy.cwsent.com> <202008271354.07RDsTeW084744@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 27 Aug 2020 06:54:29 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Aug 2020 07:03:30 -0700 X-CMAE-Envelope: MS4wfGIZt2q0BAjZ0xfVqzK1FOe3170e+knqFlNCY6KROSo9NMhSi7CvwgmU9LfmkRuj7CIXA48u5fKf59tvQPQSu9RjffjfdXsvDz+0kS08AU+DcUB6dX7K l3XSZH1KhpAOnAj7M4XiLXTSx//3mQi6P3rTJrgsmTRuAJ0Za14T1/6NUcrB0auq6KuNPakDlGpdP5+CUZ0ricbP1LUp/pfxdppYMgJEGgUBNQ7jLa4AdDqb p5LOn63lUYm6bNebgxD2D7rTxTlHG0bTm7CZjOW4pB5dH5IVtVQPGHTx3WKiDxZUveEglFvxan+FA77b7FOl3A== X-Rspamd-Queue-Id: 4BckwP6sm4z3S6F 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.138) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [0.86 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.138:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.29)[-0.293]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.07)[0.074]; NEURAL_HAM_LONG(-0.22)[-0.223]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[64.59.136.138:from]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] 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 14:03:35 -0000 What would you suggest in this case, where /etc/zfs/zpool.cache is newer than /boot/zfs/zpool.cache? slippy$ lh /boot/zfs/zpool.cache /etc/zfs/zpool.cache -rw-r--r-- 1 root wheel 4.6K Aug 25 07:19 /boot/zfs/zpool.cache -rw-r--r-- 1 root wheel 4.7K Aug 27 06:20 /etc/zfs/zpool.cache slippy$ Something like, for I in $(ls -t /etc/zfs/zpool.cache /boot/zfs/zpool.cache) with the break? -- 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. In message <202008271354.07RDsTeW084744@slippy.cwsent.com>, Cy Schubert writes: > 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 cach > e > > fi > > > le > > > or the other but not both. It makes sense to have two cache file definit > io > > ns > > > for migration, but I think that it does not make sense to split pools bet > we > > 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. >