How to Remove an SMB Share (zfs)

This procedure describes how to remove an SMB share. When you remove an SMB share, the definition of the share is removed from the server. You can re-create the share with the zfs command.

This procedure shows how to use the zfs command to remove a share, but you can also use the unshare command for other file system types. See the unshare(8) man page.

  1. Become an administrator.
  2. Remove an SMB share.
    $ zfs destroy pool/dataset%share-name

    For example, the following command removes the sales_share1 share from the tank/sales dataset:

    $ zfs destroy tank/sales%share_sales1