Cached and uncached files

A readdir operation on a directory populates the metadata of the directory in the cache, but it does not populate contents of each file within the directory. A read operation on file generates a request to home to make contents available in cache. The file contents do not need to be in cache to start reading it.

AFM allows data to be pre-populated before actual read operation using the mmafmctl prefetch command. For more information on pre-populating data, see Prefetch.

A file whose contents are completely available in the cache is called a cached file. A file whose contents are not yet present in the cache is called an uncached file. An uncached file cannot be evicted, re-synched with home, or failed over to a new home. See the sections on Asynchronous operations and delay, for AFM eviction and syncing to home.

Files that have all blocks read, or the entire file contents fetched, are marked as cached. AFM does whole-file caching by default. By default, reading more than three blocks of a file drives AFM to cache the full file in the background for performance. Sometimes the whole file might not need to be cached. For example, some applications read only a few bytes of a file to detect the file mime type. In such cases, you can configure partial file read behavior on cache fileset. For more information on partial file caching, see Partial file caching.