How to temporary disable access to ZFSSA CIFS/SMB shares?

When having to temporarily disallow access to smb shares on a ZFS Storage Appliance, a common mistake often made is to disable smbd with unexpected side effects like related processes going into a state where they generate lots of errors which consumes lots of system resources.

The preferred way of temporarily disabling access to smb / cifs shares is to set the parameter smbshare to off.

This can be achieved in the BUI in two ways:

  1. Disable at Project level
    • Select Shares > Projects > Protocols
    • There the Project Resource Name should be changed to off which causes the smbshares to be no longer shared.
    • When one wants to re-enable smb sharing the Project Resource Name parameter should be set back to it's original value. Setting it to "on" will also re-enable sharing, but the resource will use it's filesystem name as the resource name then.
  2. Disable at Share level
    • Select Shares > Projects
    • There choose the share you want to modify by hitting the pencil icon at the right side. In the new screen select the Protocols tab. There you find the "Resource Name" in the SMB parameters section. You can change the name to "off" if you don't want to share this resource.
    • If you want to re-enable sharing you should change the Resource Name parameter back to it's original value or to "on". NOTE: It may be necessary to uncheck the "Inherit from Project" parameter in order to allow modification of the parameter at share level.