[OpenIndiana-discuss] Deleting zpool.cache on OI

Jim Klimov jimklimov at cos.ru
Sat Nov 30 17:51:30 UTC 2013


On 2013-11-30 18:08, Murray wrote:
> Does anyone know of a good and complete set of instructions for deleting zpool.cache on OI? My google-fu has failed me and the incomplete instructions I've found elsewhere are not enough to get me going.

What do you want to achieve this way? The zpool.cache file caches
information about imported pools (beside rpool which is provided
by a different mechanism early in boot), and allow for faster pool
imports (needed info from labels is saved) as well as it lists the
pools for automatic import after a reboot.

If you export a pool manually, it should be removed from the cache.
If you import a pool with "-o cachefile <filename>" or "-R <altroot>"
options, it would also prevent creation of entries in the default
file.

So, to remove the file you usually need to just remove it :)
For more certainty, you can export all the non-root pools before,
or even boot into a Live Media environment. But I don't see why
such drastic measures might be needed...

Also, there is a semi-completed article of mine here, if you'd
like the pools to optionally import at boot, but not block the
OS startup if they fail:

http://wiki.openindiana.org/oi/Advanced+-+ZFS+Pools+as+SMF+services+and+iSCSI+loopback+mounts

"Semi-completed" means that at the moment there are some improvements
and generalizations to implement in the scripts provided with the
article, but all the general logic and explanation is presented there
already.

HTH,
//Jim Klimov




More information about the OpenIndiana-discuss mailing list