Publishing and Unpublishing ZFS Shares

You can temporarily unshare a named share without destroying it by using the zfs unshare command. For example:

$ zfs unshare tank/home/abc%a1share
$ grep abc /etc/dfs/sharetab
#
$ zfs share tank/home/abc%a1share
$ grep abc /etc/dfs/sharetab
/tank/home/abc  a1share smb     -

When the zfs unshare command is issued, all file system shares are unshared. These shares remain unshared until the zfs share command is issued for the file system or the share.nfs or share.smb property is set for the file system.

Defined shares are not removed when the zfs unshare command is issued, and they are re-shared the next time the zfs share command is issued for the file system or the share.nfs or share.smb property is set for the file system.