zfs
zfs copied to clipboard
zpool.cache do not survive after a zpool export
Context
- 1 pool created with a file vdev.
Short story
-
sudo zpool import -a
orsudo zpool import -d /vdev 554310920175130116
-
/etc/zfs/zpool.cache
is created (or updated) -
sudo zpool export -a[f]
zpool.cache
disappears
consequences :
zpool.cache
can not be used at boot-time
Note : FreeBSD keeps this file troughout exports or reboots.
Config
MacBookAir (2012) with SSD (APFS) - macOS 10.14.6 (18G4032)/ Darwin 18.7.0
sysctl {spl,zfs}.kext_version
spl.kext_version: 1.9.4-0 zfs.kext_version: 1.9.4-0
Strange !
- after a
zpool export [-a | pool_name]
,/etc/zfs/zpool.cache
vanished (deleted, moved ?) - while rebooting, launchd of
*...zpool-import-all.plist
do find the cache file !!
Question : was it recreated by some memory dump of the actual in-memory cache?
See log file *...zpool-import-all.log
(with a zpool list`in the import-all.plist.sh )
Running zpool import -c /etc/zfs/zpool.cache -a Finished running zpool import from cache : 0 NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT zTest 480M 347M 133M - - 38% 72% 1.00x ONLINE -