Skip to content

zpool.cache not updated when adding a pool #8549

Answered by terem42
burnsjake asked this question in Q&A
Discussion options

You must be logged in to vote

I've hit the same error following Ubuntu 18.04 Root on ZFS how-to, albeit in automated fashion, made with this automated script.

After examination of boot sequence and module/zfs/spa_config.c source code, I've found that currently in-core state is always pushed to the disk, there is no disk-to-in-core sync ever made.
As a result, after loading initramfs and mounting root filesystem, any pool import even with cachefile=none results in syncing current in-core state to disk, zapping any previous pools, stored before reboot inside /etc/zfs/zpool.cache.
In our particular case for Ubuntu, it happens when zpool-import-bpool.service runs /sbin/zpool import -N -o cachefile=none bpool command. You…

Replies: 14 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rlaager
Comment options

Answer selected by behlendorf
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #8549 on December 21, 2020 20:36.