Disable BranchCache on SMB shares
If you do not want to provide BranchCache caching services on certain SMB shares but you might want to provide caching services on those shares later, you can disable BranchCache on a share-by-share basis. If you have BranchCache configured to offer caching on all shares but you want to temporarily disable all caching services, you can modify the BranchCache configuration to stop automatic caching on all shares.
If BranchCache on an SMB share is subsequently disabled after first being enabled, ONTAP stops sending metadata to the requesting client. A client that needs data retrieves it directly from the content server (CIFS server on the storage virtual machine (SVM)).
Disable BranchCache on a single ONTAP SMB share
If you do not want to offer caching services on certain shares that previously offered cached content, you can disable BranchCache on an existing SMB share.
-
Enter the following command:
vserver cifs share properties remove -vserver <SVM_name> -share-name <share_name> -share-properties branchcacheThe BranchCache share property is removed. Other applied share properties remain in effect.
The following command disables BranchCache on an existing SMB share named “data2”:
cluster1::> vserver cifs share show -vserver vs1 -share-name data2
Vserver: vs1
Share: data2
CIFS Server NetBIOS Name: VS1
Path: /data2
Share Properties: oplocks
browsable
changenotify
attributecache
branchcache
Symlink Properties: -
File Mode Creation Mask: -
Directory Mode Creation Mask: -
Share Comment: -
Share ACL: Everyone / Full Control
File Attribute Cache Lifetime: 10s
Volume Name: -
Offline Files: manual
Vscan File-Operations Profile: standard
cluster1::> vserver cifs share properties remove -vserver vs1 -share-name data2 -share-properties branchcache
cluster1::> vserver cifs share show -vserver vs1 -share-name data2
Vserver: vs1
Share: data2
CIFS Server NetBIOS Name: VS1
Path: /data2
Share Properties: oplocks
browsable
changenotify
attributecache
Symlink Properties: -
File Mode Creation Mask: -
Directory Mode Creation Mask: -
Share Comment: -
Share ACL: Everyone / Full Control
File Attribute Cache Lifetime: 10s
Volume Name: -
Offline Files: manual
Vscan File-Operations Profile: standard
Stop automatic caching on all ONTAP SMB shares
If your BranchCache configuration automatically enables caching on all SMB shares on each storage virtual machine (SVM), you can modify the BranchCache configuration to stop automatically caching content for all SMB shares.
To stop automatic caching on all SMB shares, you change the BranchCache operating mode to per-share caching.
-
Configure BranchCache to stop automatic caching on all SMB shares:
vserver cifs branchcache modify -vserver <SVM_name> -operating-mode per-share -
Verify that the BranchCache configuration is correct:
vserver cifs branchcache show -vserver <SVM_name>
The following command changes the BranchCache configuration on storage virtual machine (SVM, formerly known as Vserver) vs1 to stop automatic caching on all SMB shares:
cluster1::> vserver cifs branchcache modify -vserver vs1 -operating-mode per-share
cluster1::> vserver cifs branchcache show -vserver vs1
Vserver: vs1
Supported BranchCache Versions: enable_all
Path to Hash Store: /hash_data
Maximum Size of the Hash Store: 20GB
Encryption Key Used to Secure the Hashes: -
CIFS BranchCache Operating Modes: per_share