跳到主要内容

创建已启用 BranchCache 的 SMB 共享

通过设置 branchcache 共享属性创建共享时,可在 SMB 共享上启用 BranchCache。

关于本任务

  • 如果 SMB 共享上启用了 BranchCache,该共享将脱机文件配置设置为手动高速缓存。

    这是创建共享时的默认设置。

  • 创建启用 BranchCache 的共享时,还可以指定其他可选共享参数。

  • 可设置共享上的 branchcache 属性,即使未在存储虚拟机(SVM)上配置和启用 BranchCache 也是如此。

    但是,如果希望共享提供高速缓存的内容,则必须在 SVM 上配置并启用 BranchCache。

  • 由于在使用 -share-properties 参数时未应用任何默认共享属性,所以除了 branchcache 共享属性之外,您还必须使用逗号分隔的列表,指定所有其他要应用到共享的共享属性。

  • 有关更多信息,请参阅 vserver cifs share create 命令的手册页。

  1. 创建启用 BranchCache 的 SMB 共享:vserver cifs share create -vserver vserver_name -share-name share_name -path path -share-properties branchcache[,...]
  2. 使用 vserver cifs share show 命令验证是否在 SMB 共享上设置了 BranchCache 共享属性。

示例

以下命令创建启用 BranchCache 的 SMB 共享,名为 data,路径为 SVM vs1 上的 /data。默认情况下,脱机文件设置将设置为 manual

cluster1::> vserver cifs share create -vserver vs1 -share-name data 
-path /data -share-properties branchcache,oplocks,browsable,changenotify

cluster1::> vserver cifs share show -vserver vs1 -share-name data
Vserver: vs1
Share: data
CIFS Server NetBIOS Name: VS1
Path: /data
Share Properties: branchcache
oplocks
browsable
changenotify
Symlink Properties: enable
File Mode Creation Mask: -
Directory Mode Creation Mask: -
Share Comment: -
Share ACL: Everyone / Full Control
File Attribute Cache Lifetime: -
Volume Name: data
Offline Files: manual
<span className="ph">Vscan File-Operations Profile: standard</span>