Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Aug 2020 11:54:02 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Cy Schubert <cy@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r364817 - head/libexec/rc/rc.d
Message-ID:  <7e55d429-482b-2277-b340-2b85c687440e@FreeBSD.org>
In-Reply-To: <202008261313.07QDDwRm040119@repo.freebsd.org>
References:  <202008261313.07QDDwRm040119@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

>   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 file
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.

> +		fi
> +	done
> +}


-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7e55d429-482b-2277-b340-2b85c687440e>