NFS Services Administrator's Guide

Configuring and Administering a Cache Filesystem
Administering CacheFS
Chapter 4156
Checking the Integrity of a Cache
The integrity of a cache can be checked by using the fsck_cachefs
command. The CacheFS version of the fsck command checks the
integrity of the cache and automatically corrects any CacheFS problems
that it encounters. The CacheFS fsck command is run automatically by
the mount command the first time the cache directory is used after
system reboot. This could be during system bootup in case if there is an
entry in /etc/fstab, or the first time the cache directory is used to
perform the mount operation. The cache directory must not be in use
while performing a cache integrity check using the fsck command.
To manually check the integrity of a cache, enter the following command:
fsck -F cachefs [-m | -o noclean]
cache-directory
Where:
-m Specifies that the cache must be checked without
making any repairs.
noclean Forces a check on the CacheFS filesystems.
cache-directory
Specifies the name of the directory where the cache
resides.
For more information on the fsck command of CacheFS, see fsck_cachefs
(1M).
Forcing a Cache Consistency Check
CacheFS periodically checks the consistency of files stored in the cache.
This ensures that the cached directories and files are kept up to date. To
check consistency, CacheFS compares the time stamp of the CacheFS file
with the corresponding file on the back filesystem. If a time difference is
observed, the cached data is purged, and the updated data is retrieved
from the back filesystem.
CacheFS provides you with the following types of consistency checks that
are also CacheFS specific mount options:
demandconst
This option verifies or checks the consistency only when explicitly
requested.