Why is zpool_cache_load="YES" not the default?

Mel Pilgrim list_freebsd at bluerosetech.com
Wed Jan 30 21:05:30 UTC 2019


In migrating a pure-ZFS system to an encrypted root, I ran into the 
problem of only the root pool being imported at boot.  The boot pool and 
any other non-root pools remain exported despite being imported when the 
system was shutdown.  This is solved by adding the following to 
/boot/loader.conf:

zpool_cache_load="YES"
zpool_cache_name="/boot/zfs/zpool.cache"
zpool_cache_type="/boot/zfs/zpool.cache"

Why is this not the default?  Encrypted ZFS-only systems are broken 
without it.  The only two places those conf lines are mentioned at all:

- A few lines in src/usr.sbin/bsdinstall/scripts/zfsboot
- https://wiki.freebsd.org/MasonLoringBliss/UEFIandZFSandGELIbyHAND

I found that one FreeBSD Wiki article among an ocean of ZFS+GELI-root 
how-tos and forum posts that don't mention this issue at all.  Some 
claim this "just works", others use a UFS /boot because they date back 
to 10-R or 9-R, when the UEFI loader didn't speak ZFS.


More information about the freebsd-questions mailing list