Re: zpools no longer exist after boot
- In reply to: Dennis Clarke : "Re: zpools no longer exist after boot"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Dec 2024 16:07:07 UTC
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