Prepopulate a FlexCache volume

This page describes how to prepopulate a FlexCache volume.

You can configure a job to prepopulate the cache, as mentioned in Cache prepopulation.

Considerations

  • Prepopulation is supported only for existing FlexCache volumes.

  • An initiated prepopulation starts a one-time job. Once this job is completed, the subsequent changes made to the source aren't continuously prepopulated in the cache. To update the cache, you must either start a new prepopulation job or allow clients to fetch the outdated files by accessing the cache.

Use the following instructions to start a prepopulation job using the Google Cloud CLI.

gcloud

To start a prepopulation job:

gcloud beta netapp volumes update VOLUME_NAME --location=LOCATION \
  --cache-pre-populate=path-list=PATH_LIST1#PATH_LIST2,exclude-path-list=EXCLUDE_PATH_LIST1#EXCLUDE_PATH_LIST2,recursion=RECURSION

Replace the following information:

  • VOLUME_NAME: the name of the volume. This name must be unique per location.

  • LOCATION: the location for the FlexCache volume.

  • PATH_LIST: Optional: a list of file or directory paths to prepopulate. Use # sign to separate multiple paths.

    The following example shows you how to add multiple file or directory paths:

    path-list=PATH_LIST1#PATH_LIST2
    
  • EXCLUDE_PATH_LIST: Optional: a list of file or directory paths to exclude when prepopulating PATH_LIST. Use # sign to separate multiple paths.

    The following example shows you how to exclude multiple file or directory paths:

    path-list=EXCLUDE_PATH_LIST1#EXCLUDE_PATH_LIST2
    
  • RECURSION: Optional: a boolean flag that indicates whether the folders specified in PATH_LIST and EXCLUDE_PATH_LIST should be included or excluded recursively. By default, this is set to false.

To check the status of a prepopulation job whether it's still running or completed, look up the FlexCache volume details. The CachePrePopulateState field within the cacheParameters output shows the current state.