Solved Trying openzfs on FreeBSD 12.1-RELEASE-p10 , zpool not imported

Alain De Vos

Aspiring Daemon

Reaction score: 177
Messages: 687

Problem : The zpools are not imported automatic on boot.
I have
/boot/loader.conf:
Code:
openzfs_load="YES"


/etc/rc.conf
Code:
openzfs_enable="YES"
kld_list="openzfs"



I solve this by explicit manual import in rc.local:
Code:
zpool import Z2
zfs mount -a
ldconfig -v -m -R /usr/local/lib


Is there a better way ?
Or must I put WITHOUT_ZFS in /etc/src.conf and recompile the kernel ?
 
OP
Alain De Vos

Alain De Vos

Aspiring Daemon

Reaction score: 177
Messages: 687

Cfr same problem.
I guess also "openzfs" on root will not work ?
 

PMc

Aspiring Daemon

Reaction score: 421
Messages: 975

Just run into the same issue. After upgrading to R.12, I thought I give this a try. I am much interested in the persistent L2ARC.

We can see in the CURRENT repo that there is now this rc.d script which is run very early. So it is the supposed way to do a zpool import -N at the beginning, and then let /etc/rc.d/zfs do the mounts.

Or must I put WITHOUT_ZFS in /etc/src.conf and recompile the kernel ?

This will not help the issue, but is a good idea anyway, because having two versions of tools with equal names on the system is probably calling for problems.
What is worse, in my case, is that I built my systems deliberately with /, /usr and /var als separate UFS filesystems. But now the zfs tools are in /usr/local (and they don't look like they were statically linked), and I have a hen-and-egg problem. :(
 

ShelLuser

Son of Beastie

Reaction score: 1,871
Messages: 3,636

First I don't understand why you'd want to use a software solution which could be considered a bit of a hack while you have a perfectly reliable ZFS engine at your disposal within FreeBSD? Just curious.

Anyway, according to their own FAQ booting from root becomes available from FreeBSD 13 and up.

Other than that I can't help wonder how you made your ZFS pool? I could easily imagine (but I'm not sure!) that the FreeBSD base supports other pool versions than OpenZFS currently does. So... what happens if you use OpenZFS to create the pool and then try to boot from it?

That would be my first idea...
 

PMc

Aspiring Daemon

Reaction score: 421
Messages: 975

First I don't understand why you'd want to use a software solution which could be considered a bit of a hack while you have a perfectly reliable ZFS engine at your disposal within FreeBSD? Just curious.
Some of us might want to use (some of) the features in openZFS.

I could easily imagine (but I'm not sure!) that the FreeBSD base supports other pool versions than OpenZFS currently does.
It doesn't seem so. My post from above was written with the system using the openZFS for accessing the pools.
That appeared to work, so far. Also, importing the pools into openZFS with the zpool command as of base Rel.12, happened to work - but I would not want to rely on such constructs.

As it appears to me, the openZFS can access and use native Rel.12 pools. And it reports that they need to be upgraded for all features to work. But then, if one does so, the pool will most likely no longer be accessible with native Rel.12 ZFS.
 
Top