Mismatch between pool hostid and system hostid on imported pool

I noticed an issue getting the status of the zfs pool

Mismatch between pool hostid and system hostid on imported pool

found some info over here
https://github.com/openzfs/zfs/issues/9367

sudo zpool export <name pool>              
sudo zgenhostid
sudo zpool set multihost=on
sudo zpool set multihost=off
sudo rm /etc/hostid
sudo zpool import -d /dev/disk/by-id -aN

These commands did the trick for me. I did not see the message anymore.
Is there somehow a relation between dracut and zfs showing this message anyway ?

1 Like

Usually that error is caused by not creating a hostid prior to creating the pool, by sharing a pool between multiple installs or by mounting the pool externally to the system.

Typically the solution is to create a hostid using sudo zgenhostid. Then export and reimport the pool. Depending on when you import the pool, you may need to then run sudo dracut-rebuild so the new hostid gets in the initrd.

What you did seems like it will not be a long-term fix since you removed the hostid you generated.

1 Like

Thanks @dalto for your quick response, it worked

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.