Software >> OS >> Unix >> Solaris >> 11 >> ZFS >> What are the differences in create shares in ZFS between Solaris 11 and Solaris 11.1


Solaris 11

  • First, use the zfs set share command to create an NFS or SMB share of ZFS file system.

    # zfs create rpool/fs1
    # zfs set share=name=fs1,path=/rpool/fs1,prot=nfs rpool/fs1
  • Then, set the sharenfs or sharesmb property to on to publish the share. For example:

    # zfs set sharenfs=on rpool/fs1
    # grep fs1 /etc/dfs/sharetab
    /rpool/fs1      fs1     nfs     sec=sys,rw


Solaris 11.1 (onwards)

# zfs create -o share.nfs=on tank/sales
# zfs create -o\* tank/sales/logs
# zfs get -r share.nfs tank/sales
tank/sales       share.nfs  on     local
tank/sales%      share.nfs  on     inherited from tank/sales
tank/sales/log   share.nfs  on     inherited from tank/sales
tank/sales/log%  share.nfs  on     inherited from tank/sales

You can provide root access to a specific system for a shared file system as follows:

# zfs set share.nfs=on tank/home/data
# zfs set share.nfs.sec.default.root=neo tank/home/data