Hi, I did a test and looks like result ok. steps: 1 run export command before restart/shutdown sudo zpool export -af 2 run import command during startup sudo zpool -c /etc/zfs/zpool.cache please try above in your environments.
BTW 1. I though the issues should be a bug, could you submit it to zfs github? 2. do you know which linux scripts file should be modified to add above 2 command? On Tue, 6 Nov 2018 at 18:19, Erik via openzfs-developer < developer@lists.open-zfs.org> wrote: > Hi, thanks for posting. At least I'm not alone. > > I'm running Gentoo, and the boot RC scripts do a zpool import, and the > matching shutdown script does a zpool export, so you'd think that zfs.cache > file would always be OK. But no. > > So the next thing that I've got planned is to: > > zpool set cachefile=none <zpool> > mv /etc/zfs/zfs.cache /etc/zfs/zfs.cache.bad > scp /etc/zfs/zfs.cache (from another machine working fine) > zpool set cachefile=/etc/zfs/zpool.cache <zpool> > zpool export > > Hopefully the last step will flush the cache to the zfs.cache file before > system reboot, and it'll clear this niggling issue up. > I'll post back when I have an outage window to try this. > *openzfs <https://openzfs.topicbox.com/latest>* / openzfs-developer / see > discussions <https://openzfs.topicbox.com/groups/developer> + participants > <https://openzfs.topicbox.com/groups/developer/members> + delivery options > <https://openzfs.topicbox.com/groups/developer/subscription> Permalink > <https://openzfs.topicbox.com/groups/developer/Tb21f7ae74f9f2635-M534605a8e2a5b4c1184e66c8> > ------------------------------------------ openzfs: openzfs-developer Permalink: https://openzfs.topicbox.com/groups/developer/Tb21f7ae74f9f2635-Md123fb0ef1a894dcf3f9fd23 Delivery options: https://openzfs.topicbox.com/groups/developer/subscription