ZFS ZFS shares don’t mount on boot with FreeBSD 13

Folks,

I updated from 12.2-STABLE to 13-STABLE (kernel/userland built from git source). Everything seems to work fine, except my ZFS shares won’t mount at boot time any more. I can manually mount them when I log in via `zpool import -a`. They are all in fine shape, regularly scrubbed with no errors, the only puzzling message I get is this:

Code:
> sudo zpool import -a
No SMB support in FreeBSD yet.
cannot share 'studio/rushes: operation not supported': SMB share creation failed
Which I’m not sure is tied to the problem I encounter.

I’ve dug somewhat into this, found a suggestion to try and export the shares and re-import them, but no dice.

As usual, if anyone has an idea which would save me a lot of reboots, I’d gladly take it!

Thanks a bunch in advance!
V.
 
Do you have zfs_enable="YES" in rc.conf?
Hey! :)

I forgot to mention that all worked flawlessly on 12.2-STABLE. So yes, everything is correctly set up. But for some reason, when I upgraded to 13-STABLE, it ceased to mount automatically at boot time.

V.
 
"ZFS Shares" as in "ZFS datasets exported from another system via NFS"?
Or are these local to the physical machine that you are trying to share to other machines?

Before you do the zpool import -a, what is the output of
zpool list
zpool import (without the -a)
 
Did you set the "sharesmb" property? This doesn't/didn't work under FreeBSD up until the 12 branch:

zfs(8)
sharesmb=on | off | opts
The sharesmb property currently has no effect on FreeBSD.

This property was only for the native smb server on solaris/illumos and was ignored under FreeBSD.

There is/was some effort to make this work with samba, but as I don't use samba I never really followed that topic. But according to zfsprops(8) in FreeBSD 13.0-RELEASE, there already is some sort of support, so if you've set "sharesmb=on" on those filesystems, it might have a hard dependency on samba being present at mount time.

So if you really want to share those datasets via SMB, you have to have samba installed and most likely also configured and running. If you don't have to support windows, just use the "sharenfs" property and NFS.
 
"ZFS Shares" as in "ZFS datasets exported from another system via NFS"?
Or are these local to the physical machine that you are trying to share to other machines?

Before you do the zpool import -a, what is the output of
zpool list
zpool import (without the -a)
No, I use shares in a loosely way. I should have used 'slices' or 'mount points'. They’re located on local disks. I currently don’t use NFS.

Doesn't answer my question though.

Yes, you’re quite right. But, yes, I do. This is the relevant excerpt of my rc.conf:

Code:
pflog_program="/sbin/pflogd"    # where the pflogd program lives
pflog_flags=""                             # additional flags for pflogd

# ZFS
zfs_enable="YES"
zfsd_enable="YES"

# POSTGRESQL
postgresql_enable="YES"

Did you set the "sharesmb" property? This doesn't/didn't work under FreeBSD up until the 12 branch:
[…]
Ah, I didn’t pay attention to this, so probably not. Thanks a bunch for the tip. I can’t really reboot my server right now, lest I be stoned by the other people around, but I’ll try ASAP and let you know.
 
No, I use shares in a loosely way. I should have used 'slices' or 'mount points'. They’re located on local disks. I currently don’t use NFS.

Then I think you should first get your wording right before we can help you - slices and mount points are completely different things as well as shares or datasets (what I suspect is what you are actually talking about...)
 
Then I think you should first get your wording right before we can help you - slices and mount points are completely different things as well as shares or datasets (what I suspect is what you are actually talking about...)
I'm sorry, I tend to rely on very old terminology. I know slices (disk areas as found in the partition list) and mount points are different. I wanted to be as clear as possible, but I muddled the things ever more. And 'shares' are samba objects. Once again, I apologise for mixing that freely. I'm going to be a little more careful.

Look in dmesg if you have warnings / errors concerning your "shares".
Yeah, that was the first thing I did, but there's nothing there. Just plain vanilla ZFS messages:

ZFS filesystem version: 5
ZFS storage pool version: features support (5000)

However I have these messages:

Root mount waiting for: usbus0 usbus1 usbus2 usbus3 CAM usbus4 usbus5 usbus6 usbus7
Then:
mountroot: waiting for device /dev/ada0p2...

Which seems to suggest the disks are slow to get online. Could it be that zfs tries to mount the disks when they're not yet ready? But what could cause such delay?
 
The waiting messages are not unusual.

You might need to pay attention to one or both of:

/boot/zfs/zpool.cache
/etc/zfs/zpool.cache
 
Sorry, I was on holiday until now.

Did you set the "sharesmb" property? This doesn't/didn't work under FreeBSD up until the 12 branch:

zfs(8)


This property was only for the native smb server on solaris/illumos and was ignored under FreeBSD.

There is/was some effort to make this work with samba, but as I don't use samba I never really followed that topic. But according to zfsprops(8) in FreeBSD 13.0-RELEASE, there already is some sort of support, so if you've set "sharesmb=on" on those filesystems, it might have a hard dependency on samba being present at mount time.

So if you really want to share those datasets via SMB, you have to have samba installed and most likely also configured and running. If you don't have to support windows, just use the "sharenfs" property and NFS.

Err…
Server> sudo zfs set sharesmb=on home
No SMB support in FreeBSD yet.
cannot share 'home: operation not supported': SMB share creation failed
Server> uname -v
FreeBSD 13.0-STABLE #3 stable/13-n246265-791035c8da5: Wed Jul 14 15:30:12 CEST 2021 root@mail.geomag.fr:/usr/obj/usr/src/amd64.amd64/sys/GENERIC

The waiting messages are not unusual.

You might need to pay attention to one or both of:

/boot/zfs/zpool.cache
/etc/zfs/zpool.cache
I tried to rename both these files and reboot, but it doesn't solve the issue :/

Thanks to both, and sorry it took so long for me to answer!
 
Back
Top