sharenfs+sharesmb unsupported?

Hi,

I'm running a pretty much vanilla FreeBSD 9.1 (amd64) installation. One thing is puzzling me on which I did find very little results searching the web. I try to enable NFS and Samba sharing like this:
Code:
zfs set sharenfs=on tank0/Videos
zfs set sharesmb=on tank0/Videos
Both result in a simple error message:
Code:
Unsupported share protocol: 1.
Did I get a wrong version or why isn't it working? But regardless of that error message the state of the property chances to "on" but I cannot connect to it.

Any ideas? :) Thank you very much.
 
The sharesmb option doesn't work. However, sharenfs does work but it's a bit of a hack on FreeBSD. On Solaris it can communicate directly with the NFS (or CIFS in the case of sharesmb) implementation in the kernel. On FreeBSD it simply creates a /etc/zfs/exports which is loaded by FreeBSD's nfsd(8).

Code:
root@molly:~ # zfs get sharenfs storage/media
NAME           PROPERTY  VALUE                                     SOURCE
storage/media  sharenfs  maproot=0,network=2001:470:1f15:bcd::/64  local
root@molly:~ # cat /etc/zfs/exports | grep media
/storage/media  -maproot=0 -network=2001:470:1f15:bcd::/64
 
In other words, to export a ZFS filesystem or directory via SMB/CIFS, use Samba.

And, to export a ZFS filesystem or directory via NFS, use the standard /etc/exports file.

Don't treat ZFS like anything special when it comes to sharing files over a network. Use the normal tools you would use to share UFS or any other filesystem.
 
Back
Top