openzfsonosx / zfs

OpenZFS on OS X
https://openzfsonosx.org/
Other
824 stars 72 forks source link

zpool.cache do not survive after a zpool export #757

Open captain-haddock17 opened 4 years ago

captain-haddock17 commented 4 years ago

Context

Short story

  1. sudo zpool import -aor sudo zpool import -d /vdev 554310920175130116
  2. /etc/zfs/zpool.cache is created (or updated)
  3. 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

captain-haddock17 commented 4 years ago

Strange !

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 -