本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。
停用SMB共用區上的BranchCache
如果您不想在某些SMB共用區上提供BranchCache快取服務、但稍後可能想要在這些共用區上提供快取服務、可以逐一停用BranchCache。如果您已將BranchCache設定為在所有共用區上提供快取功能、但想要暫時停用所有快取服務、您可以修改BranchCache組態、以停止在所有共用區上自動快取。
如果SMB共用區上的BranchCache在第一次啟用後即停用、ONTAP 則停止傳送中繼資料給要求的用戶端。需要資料的用戶端會直接從內容伺服器(儲存虛擬機器(SVM)上的CIFS伺服器)擷取資料。
在單一 ONTAP SMB 共用上停用 BranchCache
如果您不想在先前提供快取內容的某些共用區上提供快取服務、可以停用現有SMB共用區上的BranchCache。
步驟
-
輸入下列命令:
vserver cifs share properties remove -vserver <SVM_name> -share-name <share_name> -share-properties branchcache會移除BranchCache共用內容。其他已套用的共用內容仍會維持有效。
範例
下列命令會在名為「data2」的現有SMB共用區上停用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
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
停止所有 ONTAP SMB 共享上的自動緩存
如果您的BranchCache組態自動啟用每個儲存虛擬機器(SVM)上所有SMB共用區的快取、您可以修改BranchCache組態、停止自動快取所有SMB共用區的內容。
關於這項工作
若要停止在所有SMB共用區上自動快取、請將「BranchCache」作業模式變更為「每個共用快取」。
步驟
-
設定 BranchCache 以停止所有 SMB 共用的自動快取:
vserver cifs branchcache modify -vserver <SVM_name> -operating-mode per-share -
請確認 BranchCache 配置是否正確:
vserver cifs branchcache show -vserver <SVM_name>
範例
下列命令會變更儲存虛擬機器(SVM、先前稱為Vserver)VS1上的BranchCache組態、以停止所有SMB共用區上的自動快取:
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