ZFS Dual boot, preventing automatic zpool import

I have a dual-boot freebsd-on-zfs & alpine-linux-on-zfs.
But when booting linux, the freebsd zpools are automatic imported and mounted.
The solution, I ended up specifying everywhere canmount=off & using an fstab to mount in freebsd.
It is said you can play with zpool cache files to prevent automatic import, but that seemed not work.
 
In my outerbase remote-unlock system, I use zfs_enable="NO" in /etc/rc.conf to stop the outerbase importing the pool. I can import and work with it manually, but I haven't done a thorough test for side-effects. You could probably just read /etc/rc.d/zfs to find out. In fact, it seems to be a pretty short file.
 
But when booting linux, the freebsd zpools are automatic imported and mounted.
The solution, I ended up specifying everywhere canmount=off & using an fstab to mount in freebsd.
So, in order to "fix" the problem for Linux you mangle the FreeBSD side of things? Shouldn't you try to figure out how to stop Linux from automatically importing the pool?
 
That was exactly my idea. But I rest open for suggestions.
In freebsd you can set "zpool_enable=NO" in rc.conf to prevent this.
For alpine-linux using openrc I have no clue. There is no forum or open mailinglist.
 
If they're importing pools that aren't in the zpool.cache file, that sounds like a bug Alpine needs to fix. It's really antithetical to the ZFS mode of operation. I know for a fact that neither Arch nor Debian suffer this issue.
 
Back
Top