Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2024 18:07:07 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Dennis Clarke <dclarke@blastwave.org>, Ronald Klop <ronald-lists@klop.ws>
Cc:        Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Re: zpools no longer exist after boot
Message-ID:  <ec396a92-b5f5-4ea6-97b3-65b12b24e066@FreeBSD.org>
In-Reply-To: <043aee93-3dbd-4e6f-b0ee-fc6ebae9b8ef@blastwave.org>
References:  <1764191396.6959.1732802309600@localhost> <043aee93-3dbd-4e6f-b0ee-fc6ebae9b8ef@blastwave.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28/11/2024 16:16, Dennis Clarke wrote:
> So the cachefile property needs to be a specific filename or that script
> will have no clue.

Initially you looked at those things al little bit backwards.

To know properties of a pool you have to import the pool.
But how would you know that the pool is to be imported?

So, it works in a different way.
/etc/zfs/zpool.cache lists the pools that you want auto-imported.
/boot/zfs/zpool.cache is a legacy location of that file, so it's consulted as well.

If you want a pool to be auto-imported, you must have it in /etc/zfs/zpool.cache.
So, the pool's cachefile property must be set to that path.
Which is also the default.

The cachefile property is changed only in special cases like importing a pool 
under alternative root.  Or wanting to produce a cache file with a pool but not 
wanting the pool in the system cache file (/etc/zfs/zpool.cache).

So, basically if you do not have a purpose for changing the property, then don't 
change it.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ec396a92-b5f5-4ea6-97b3-65b12b24e066>