跳到主要内容

预填充 FlexCache 卷

您可以预填充 FlexCache 卷来减少访问缓存数据所需的时间。

  • 您必须是具有高级权限级别的集群管理员
  • 传递给预填充的路径必须有效,否则预填充操作将会失败。
  • 预填充会在各个目录中抓取,但仅读取文件
  • is-recursion 标志适用于传递给预填充的整个目录列表
  1. 预填充 FlexCache 卷:volume flexcache prepopulate -cache-vserver vserver_name -cache-volume -path-list path_list -is-recursion true|false

    此示例为预填充提供了单个目录路径:

    cluster1::*> flexcache prepopulate start -cache-vserver vs2 -cache-volume fg_cachevol_1 -path-list /dir1
    (volume flexcache prepopulate start)
    [JobId 207]: FlexCache prepopulate job queued.

    此示例为预填充提供了多个路径:

    cluster1::*> flexcache prepopulate start -cache-vserver vs2 -cache-volume fg_cachevol_1 -path-list /dir1,/dir2,/dir3,/dir4
    (volume flexcache prepopulate start)
    [JobId 208]: FlexCache prepopulate job queued.

  2. 显示读取的文件数:job show -id job_ID -ins