Another ZFS NFS question

Hello everyone, I've looked through all the questions about ZFS share through NFS and did not found any solution of my problem. I am creating ZFS share on freeBSD14 and then trying to mount it on MacOS. So here is the /etc/rc.conf
Bash:
hostname="zfscheck"
ifconfig_em0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
moused_nondefault_enable="NO"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
zfs_enable="YES"

nfs_server_enable="YES"
nfsv4_server_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

Here is the /etc/exports
Code:
V4: /public

Here is the df
Code:
Filesystem             1K-blocks   Used    Avail Capacity  Mounted on
zroot/ROOT/default      78738504 738732 77999772     1%    /
devfs                          1      0        1     0%    /dev
/dev/gpt/efiboot0         266144   1744   264400     1%    /boot/efi
zroot                   77999868     96 77999772     0%    /zroot
zroot/usr/src           77999868     96 77999772     0%    /usr/src
zroot/public_dataset    77999868     96 77999772     0%    /public
zroot/var/crash         77999868     96 77999772     0%    /var/crash
zroot/var/audit         77999868     96 77999772     0%    /var/audit
zroot/everyone_dataset  77999868     96 77999772     0%    /everyone
zroot/home              77999904    132 77999772     0%    /home
zroot/tmp               77999876    104 77999772     0%    /tmp
zroot/usr/ports         77999868     96 77999772     0%    /usr/ports
zroot/var/log           77999944    172 77999772     0%    /var/log
zroot/var/tmp           77999868     96 77999772     0%    /var/tmp
zroot/var/mail          77999868     96 77999772     0%    /var/mail

Here is the "zfs get sharenfs"
Code:
NAME                    PROPERTY  VALUE                    SOURCE
zroot                   sharenfs  off                      default
zroot/ROOT              sharenfs  off                      default
zroot/ROOT/default      sharenfs  off                      default
zroot/everyone_dataset  sharenfs  -network=192.168.1.0/24  local
zroot/home              sharenfs  off                      default
zroot/public_dataset    sharenfs  -network=192.168.1.0/24  local
zroot/tmp               sharenfs  off                      default
zroot/usr               sharenfs  off                      default
zroot/usr/ports         sharenfs  off                      default
zroot/usr/src           sharenfs  off                      default
zroot/var               sharenfs  off                      default
zroot/var/audit         sharenfs  off                      default
zroot/var/crash         sharenfs  off                      default
zroot/var/log           sharenfs  off                      default
zroot/var/mail          sharenfs  off                      default
zroot/var/tmp           sharenfs  off                      default

So I have 2 datasets which are public_dataset and everyone_dataset which are mounted on the root of filesystem and they are "chmod -R 777" and these datasets are shared through NFSV4. When I try to mount it with Finder in mac with string "nfs://192.168.1.165" it mounts it always with "/" sign and always public_dataset. If I try to "nfs://1982.168.1.165:/everyone" it refuses to mount anything

When I try to mount it from console I'll get
Code:
mount -t nfs 192.168.1.165:/public /Volumes/public
mount_nfs: can't mount /public from 192.168.1.165 onto /Volumes/public: No such file or directory
mount: /Volumes/public failed with 2

Could anyone explain how to differentiate between 2 shares of zfs to mount only one of them
 
Make sense, thanks. And if I want to mount another dataset which is everyone_dataset, then what should I modify?
 
I would create an /exports directory and put everyone and public under it. Then set V4: /exports, so you're exporting 192.168.1.165:/everyone and 192.168.1.165:/public.
 
Thanks a lot. I thought about it too - but is there any way to mount only specific dataset? I do understand that I can chmod and refuse some users to open specific folders
 
but is there any way to mount only specific dataset?
Well, you can mount one or both, so I'm not quite sure what you're asking? Just because they're both exported doesn't mean a client system has to mount them all.
 
Back
Top