How To Share ZFS As NFS in Solaris 11
How To Share ZFS As NFS in Solaris 11
ZFS is the default file system when it comes to Solaris 11. In solaris 11, Oracle made it
even easy to share ZFS as NFS file system. The major change that oracle made in NFS
sharing is that it removed the dependency of /etc/dfs/dfstab to share NFS permanently.
The file /etc/dfs/dfstab is obsolete in Solaris 11, so even if you make any changes to it,
they are ignored.
Solaris 11 makes use of SMF services to share the NFS file systems automatically while
booting. In solaris 11 the ZFS file system is shared as NFS in 2 steps :
Step 1
Name the share, by assigning a value to datasets name property :
# zfs set share=name=fs1,path=/fs1,prot=nfs geekpool/fs1
There is no need to edit any file to make the share permanent. By default when you turn
on the sharenfs property to on, it gets permanently shared. SMF services takes care of
sharing the NFS file system while booting.
The legacy ZFS sharing Syntax (Solaris 10 Way)
The legacy way of sharing the ZFS file system as NFS (using share command) from solaris
10 is still supported without having to use /etc/dfs/dfstab. Instead we use the
file /etc/dfs/sharetab in Solaris 11.
# share -F nfs /fs1
# cat /etc/dfs/sharetab
/fs1
nfs
rw
Inheritance of share
When you share a ZFS file systems as NFS, all its children inherit the sharenfs property.
For example if we share geekpool/fs1 :
# zfs set share=name=fs1,path=/fs1,prot=nfs geekpool/fs1
name=fs1,path=/fs1,prot=nfs
If you check the share sharenfs property of geekpool/fs1/fs2 which is a child dataset of
fs1 :
# zfs get sharenfs geekpool/fs1/fs2
ZFS as NFS Page 1
SOURCE
inherited from geekpool/fs1