ZFS OpenZFS not mounting data sets at boot?

Hi,

I have installed the sysutils/openzfs port on a 12.1-RELEASE system with a UFS root volume and a single zpool. The zpool/datasets are imported and mounted fine with the native ZFS, but when I switch over to OpenZFS, my dataset is not mounted at system boot time.

I have openzfs_load="YES" in /boot/loader.conf, zfs_enable="YES" in /etc/rc.conf, and I can see that the relevant kernel modules are loaded properly:

Code:
root@beastie:~ # kldstat
Id Refs Address                Size Name
1   20 0xffffffff80200000  2448d90 kernel
2    1 0xffffffff82649000   553dc8 openzfs.ko
3    2 0xffffffff82b9d000     90b8 cryptodev.ko
4    1 0xffffffff82c19000     2668 intpm.ko
5    1 0xffffffff82c1c000      b50 smbus.ko
6    1 0xffffffff82c1d000      acf mac_ntpd.ko

I feel like I am missing something very simple, but I am not sure what that might be, probably owing to my relative unfamiliarity with FreeBSD. I am under the impression that the OpenZFS port should "just work." Any ideas?
 
A bump and a bit of additional detail/clarification: The zpool exists and appears healthy, but is not being imported at boot, despite the above parameters appearing to be set correctly:

Code:
root@beastie:~ # zpool import
   pool: data
     id: 8429503014153053641
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

        data        ONLINE
          ada1p1    ONLINE
 
Have you actually ran zpool import data since switching over to the ZFS port?

Yes, and I can access the files in the "data" pool. But then unfortunately it is not mounted after a reboot. The behavior is consistent. However, if I go back to the "native" ZFS, the pool is imported/mounted at boot.
 
ServeFree||Die, did you ever find a solution to this? I'm running into the same issue on 12.1-STABLE r359422 and OpenZFS port 2020031600.

I had not (admittedly, I was not motivated enough to try one of the mailing lists, but that would have likely been the next logical step).

I'm no expert, but i'm using in rc.local
/usr/local/sbin/zpool import -N pool
/usr/local/sbin/zfs mount -va
service mountd reload
Seems freebsd prefer to use /sbin/zpool which cannot mount openzfs pool.

Interesting - will rc.local be respected at boot? If you have a zroot pool, you wouldn't be able to boot the system at all, since the problem (/sbin/zpool not understanding OpenZFS) would be present during the very beginning of the boot process.
 
Interesting - will rc.local be respected at boot? If you have a zroot pool, you wouldn't be able to boot the system at all, since the problem (/sbin/zpool not understanding OpenZFS) would be present during the very beginning of the boot process.

Had a little bit of time this afternoon to test, and to answer my own question: Adding the following to /etc/rc.local was sufficient to get the zroot pool to be recognized and complete the boot process:

Code:
/usr/local/sbin/zpool import -N zroot
/usr/local/sbin/zfs mount -va

I would guess one could also do /usr/local/sbin/zpool import -a if there were multiple pools and you didn't want to list them line-by-line?

Big thanks to maldenvik for providing this solution!
 
ServeFree||Die, did you ever find a solution to this? I'm running into the same issue on 12.1-STABLE r359422 and OpenZFS port 2020031600.

Same here.

I'm no expert, but i'm using in rc.local
/usr/local/sbin/zpool import -N pool
/usr/local/sbin/zfs mount -va
service mountd reload
Seems freebsd prefer to use /sbin/zpool which cannot mount openzfs pool.

according to https://zfsonfreebsd.github.io/ZoF/ I can see they tell to rebuild world without the zfs tools from base. That may be the point.

So far I can't boot and have all zfs pools on.
 
Back
Top