[SOLVED] zfs share or exportfs, what is to use?

fireon

Distinguished Member
Oct 25, 2010
4,598
545
183
Austria/Graz
deepdoc.at
Hello,

i use proxmox as storage directly and VMs. So last hour i read a little bit in manpages, searching for pve-zsync and i found an share option for ZFS. Sorry, never belongs before. I use NFS and Samba to share the files. NFS works but have some problems. Must the service start in rc.local with timeout, because zpool is not ready when nfs-kernel-server is autoastarting. Ok. I have an extra dataset:
Code:
v-machines/home                                        2.33T  2.57T  2.33T  /v-machines/home
In manpage you can see this:
Code:
sharenfs=on | off | opts


           Controls whether the file system is shared via NFS, and what options are used. A file system with a sharenfs property of  off  is  managed
           with  the  exportfs(8)  command and entries in /etc/exports file. Otherwise, the file system is automatically shared and unshared with the
           zfs share and zfs unshare commands. If the property is set to on, the dataset is shared using the exportfs(8)  command  in  the  following
           manner (see exportfs(8) for the meaning of the different options):


               /usr/sbin/exportfs -i -o sec=sys,rw,no_subtree_check,no_root_squash,mountpoint *:<mountpoint of dataset>


           Otherwise, the exportfs(8) command is invoked with options equivalent to the contents of this property.


           When  the  sharenfs  property  is  changed  for a dataset, the dataset and any children inheriting the property are re-shared with the new
           options, only if the property was previously off, or if they were shared before the property was changed. If the new property is off,  the
           file systems are unshared.

another thing is
Code:
sharesmb=on

So what is the better way? NFS way or ZFS way for NFS...? Strange. Thanks for help.

Best Regards
 
Nobody use this feature? I have done this with an testmachine:

zfs set sharenfs=on rpool/home

exportfs
/rpool/home <world>

But where i can set options?
 
Does only work when you use only the zfs-share feature. It is not mixable with exports or smb.conf.