跳到主要内容

更改 BranchCache 服务器密钥

可通过在存储虚拟机(SVM)上修改 BranchCache 配置并指定其他服务器密钥,从而更改 BranchCache 服务器密钥。

关于本任务

可以将此服务器密钥指定为一个特定值,这样,如果多台服务器为相同的文件提供 BranchCache 数据,则客户端便可使用共享这一服务器密钥的任一服务器中的哈希。

更改服务器密钥时,必须清除哈希缓存。哈希清空后,ONTAP 会在启用了 BranchCache 的客户端发出新的请求时创建新哈希。

  1. 使用以下命令更改服务器密钥:vserver cifs branchcache modify -vserver vserver_name -server-key text -flush-hashes true

    在配置新的服务器密钥时,还必须指定 -flush-hashes,并将值设置为 true
  2. 使用 vserver cifs branchcache show 命令验证 BranchCache 配置是否正确。

示例

以下示例显示了如何设置包含空格的新服务器密钥,以及如何清空 SVM vs1 上的哈希缓存:

cluster1::> vserver cifs branchcache modify -vserver vs1 
-server-key "new vserver secret" -flush-hashes true

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