From nobody Sun Dec 15 16:07:07 2024 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YB7Hx0cn0z5h13J for ; Sun, 15 Dec 2024 16:07:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YB7Hw70ptz45jj; Sun, 15 Dec 2024 16:07:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734278829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AdxOWfGd4qGTN83r+g9i2LwCgpcqhbxVk638yjqRUfY=; b=ANl8NgxQw2dXnrRBlUHTKKNP1hanhIj+zdhpwdsfrzK5KvKa9ed+DrTrbdFNW1jqCX8AZ8 CVrIkiXZRTFfAzioooNt9ivDiDLyJNQLL69hCiOblw7uu28t6TooBOgAeLcPvwxBJW0+sO 7GMiJGLSs3ott6HIYtV+Jez25jwZTGuyC3E02Ze9LWNt7tMrZfqvRm/+437bxjQDJsUadL wMdVbeGY30E90OS3WTjXs+7DE1IyQxLHlsYCxzbshrKQRkdYOWylPFay/JaJXRG8RyKboM ni8y1NWfV3Zz0xraW5aqUVeyUOf5jt9TiBqf6j8jseMnGxAMGFvyWpND/cxeQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734278829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AdxOWfGd4qGTN83r+g9i2LwCgpcqhbxVk638yjqRUfY=; b=xT8easedE18vYMowgIC3+rX97P/jeRtAT8GsJ7PcJ6lhi/jDDDosEbHA5b8igrcWxRhyIQ r5I62u8sLWBIQisxOnk0SZ6xVGylZ7UKjZVZoAsHG04qV9yZKhuP1DL2tME8njSOYKqQqa lZv1DPxOkZlbuSuwyyBuh+rD0RF7EfRe0KeCBL3P2LGpbrNCVzEv8m5BfOdqCN/aeMg521 3Ic+n1vlRaEO9v87kbV2P66IypfwsD14xrIVEAMzgOa7+1qEGFANx9LIRJaRdLErjljVEH kEzNbsJNgPaRyxLUvQKVXfyHv5lhg3ECVfT564vQzCrXL4YiBnK/EMTL5hg4cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734278829; a=rsa-sha256; cv=none; b=aLF2/Psn7nDR7IYkprg3GIqUGYupQZR+dkmp96FaRNSxISOyosP2KH6DJAW1lbf0EFtKtF ct9Znh5vtppf2o6vhkHZl09dumfXTAWJfB5ypxCw0yIDuEfeeyZgIL7IAigRfdSUpy8OjV +/pKcON3VO1VotM42y/+g1cSA9eoH7BokwBzls6Kdp/+LXeineijj4+bvIoIf9orKBpV42 Wwe194gJWSXfISkbrQkcOMxIceQJdc2slQz1OIJh1ZkHTKUarZ0qG6kKGKTxMPDKnNBnRA FrsyHP56Sh9I1XWLes563+H+Rvrn19IEm/sZLjMfWFsJrGKqQRZUEmmO2d0Crg== Received: from [192.168.0.88] (unknown [93.188.39.137]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YB7Hw3F8JzRW1; Sun, 15 Dec 2024 16:07:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: Date: Sun, 15 Dec 2024 18:07:07 +0200 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: zpools no longer exist after boot To: Dennis Clarke , Ronald Klop Cc: Current FreeBSD References: <1764191396.6959.1732802309600@localhost> <043aee93-3dbd-4e6f-b0ee-fc6ebae9b8ef@blastwave.org> Content-Language: en-US From: Andriy Gapon In-Reply-To: <043aee93-3dbd-4e6f-b0ee-fc6ebae9b8ef@blastwave.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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