System Administration Guide: Basic Administration

Consistency Checking of a CacheFS File System

To ensure that the cached directories and files remain current, the CacheFS software periodically checks the consistency of files stored in the cache. To check consistency, the CacheFS software compares the current modification time to the previous modification time. If the modification times are different, all data and attributes for the directory or file are purged from the cache and new data and attributes are retrieved from the back file system.

When a user requests an operation on a directory or file, the CacheFS software checks if it is time to verify consistency. If so, the CacheFS software obtains the modification time from the back file system and performs the comparison.

Consistency Checking on Demand

Consistency checks can be performed only when you explicitly request them for file systems that are mounted with -o demandconst option. If you mount a file system in a cache with this option, then use the cfsadmin command with the -s option to request a consistency check. By default, consistency checking is performed file by file as the files are accessed. If no files are accessed, no checks are performed. Using the -o demandconst option avoids the situation where the network is flooded with consistency checks.

For more information, see mount_cachefs(1M).