Loading...
 

ZFS Volume Sharing

Create a user for sharing permissions

$ useradd -d /zpool/data -u 501 some_nfs_account
$ chown -R some_nfs_account /zpool/data

Add other users and change group permissions if necessary

Set sharing permissions on filesystem

$ zfs set sharenfs=sec=sys,rw=@ip_address zones/data
$ zfs get sharenfs zpool/data
NAME PROPERTY VALUE  SOURCE
zones/data sharenfs sec=sys,rw=@ip_address  local

set up mounts on a Mac

/etc/auto_master:

/etc/auto_master:
 # There must be only one entry with this location because if more than one entry in the master map has the same mountpoint then all but the first are ignored
/Network/Servers auto_nas -nobrowse,nosuid

/etc/auto_nas:

local_ref -fstype=nfs,noowners,nolockd,noresvport,hard,bg,intr,rw,tcp,nfc nfs://server:/zpool/data/sub_direcotry

Refreshing mounts and checking what shares are available

$ automount -vc
$ showmount -de server_address



opening /Network/Servers will show the mounted volume which can then be copied to the sidebar in finder

Logging

/etc/nfs/nfslog.conf:
global defaultdir=/var/log \
log=nfslog fhtable=fhtable buffer=nfslog_workbuffer logformat=extended


http://www.softpanorama.org/Net/Application_layer/NFS/nfs_logging.shtml
https://docs.oracle.com/cd/E19120-01/open.solaris/819-1634/rfsadmin-101/index.html