I am having a setup of a dual boot PC running FreeBSD 12 and Debian 10. There is a three disk zraid in the system created by FreeBSD which I would like to use as a common storage pool for both operating systems.
In principle I can mount the pool from both OSes, however I get an error because the two host IDs of both installations are different and the pool is not exported during shutdown. I can override it using
zpool import -f, however it seems not like a very clean solution.
How can I solve this problem? I can think of two possibilities:
manually set the host IDs to make the two IDs identical for FreeBSD and Debian (not sure if this is really a good idea, because it is called ID for some reason)
put something in the shutdown routine of each OS to make it export the pool automatically. However I would need the corresponding import functionality on startup.
Data consistency and data safety is of big importance, that why I am using ZFS in the first place.