# Combination ZFS and SAMBA not working in 13.0p4



## BertN45 (Nov 17, 2021)

I run 32-bits FreeBSD 13.0 p4 on a Pentium 4 HT. I have installed Samba, restarting samba gives the next result. 

root@Pentium:~ # service samba_server restart
Performing sanity check on Samba configuration: OK
Stopping smbd.
Waiting for PIDS: 803.
Stopping nmbd.
Performing sanity check on Samba configuration: OK
Starting nmbd.
Starting smbd.

and

root@Pentium:~ # service samba_server status
nmbd is running as pid 22200.
smbd is running as pid 22207.

I don't see the Pentium appear on the network. I did not activate any firewall and sharing a zfs dataset gives the following result:

root@Pentium:~ # zfs set sharesmb=on dpool/ryzen/data
No SMB support in FreeBSD yet.
cannot share 'dpool/ryzen/data: operation not supported': SMB share creation failed

How can I share zfs datasets over the network using samba, since there seems to be no SMB support in OpenZFS in FreeBSD?
Must I move to NFS?


----------



## astyle (Nov 17, 2021)

Samba works perfectly fine on ZFS-based FreeBSD. I have it running. I would strongly recommend reading the Handbook section on Samba, it should help you get started. Don't mess with ZFS, Samba will work just fine while ignoring the ZFS stuff.


----------



## Geezer (Nov 18, 2021)

BertN45 said:


> How can I share zfs datasets over the network using samba



You don't. In your smb4.conf, you share a directory with the `path` keyword, whether or not it relates to a dataset.


----------



## _martin (Nov 18, 2021)

BertN45 said:


> root@Pentium:~ # zfs set sharesmb=on dpool/ryzen/data
> No SMB support in FreeBSD yet.
> cannot share 'dpool/ryzen/data: operation not supported': SMB share creation failed



ZFS was ported from Solaris. There you have an option to share the ZFS fileset directly via samba or NFS. On FreeBSD sharing fileset via samba is not supported (it is via NFS).
That's what the error message is about. 

As it was mentioned above you can still share the filesystem via samba the usual way (modifying samba's config).


----------



## grahamperrin@ (Nov 21, 2021)

BertN45 said:


> … 32-bits FreeBSD 13.0 p4 …





_martin said:


> … On FreeBSD sharing fileset via samba is not supported …



Please, are you certain?

*OpenZFS* zfsprops(7) includes:



> *sharesmb*=*on*|*off*|opts



The same in zfsprops(8) for FreeBSD 13.0-RELEASE.


----------



## _martin (Nov 21, 2021)

Yes, as far as I know and as far as that error says so. While FreeBSD 12 has explicit message that sharesmb has no effect, 13 doesn't mention this. But then man page on 13 is still more Linux specific. 
Error message is clear though.


----------



## grahamperrin@ (Nov 21, 2021)

_martin said:


> Error message is clear though.



Thanks. I see _No SMB support in FreeBSD yet_:


```
root@mowa219-gjp4-8570p-freebsd:~ # zfs set sharesmb=on august/usr/ports
No SMB support in FreeBSD yet.
cannot share 'august/usr/ports: operation not supported': SMB share creation failed
root@mowa219-gjp4-8570p-freebsd:~ # zfs --version
zfs-2.1.99-FreeBSD_g6c8f03232
zfs-kmod-2.1.99-FreeBSD_g6c8f03232
root@mowa219-gjp4-8570p-freebsd:~ # uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #115 main-n250650-ef396441ceb: Sat Nov 13 23:52:09 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400041 1400041
root@mowa219-gjp4-8570p-freebsd:~ #
```

(I read that as _in OpenZFS in FreeBSD_; not _in FreeBSD_.)


----------

