NFS Services Administrator's Guide (B1031-90072, March 2011)
Checking the Integrity of a Cache
You can use the fsck command to check the integrity of a cache. 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
when the cache directory is accessed for the first time after a system reboot. The command is run
either during system bootup if there is an entry in /etc/fstab, or the first time the cache directory
is referenced as part of the mount operation.
To manually check the integrity of a cache, enter the following command:
fsck_cachefs -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.
The cache directory must not be in use while performing a cache integrity check using the fsck
command. To list the CacheFS mount-points that are using a specific cache directory, for example,
/disk2/cache, enter the following command:
mount | grep -w "cachedir=/disk2/cache" | awk '{print $1}
An output similar to the following is displayed if CacheFS mount-points are using the cache directory:
/cfs_mnt1
/cfs_mnt2
You must now unmount these mount-points before you check the integrity of a cache. For information
on how to unmount a cache mount-point, see “Unmounting a Cache Filesystem” (page 87).
For more information on the fsck_cachefs command of CacheFS, see fsck_cachefs(1M).
Updating Resource Parameters
Each cache has a set of parameters that determines its structure and how it behaves. When a
cache directory is created, it gets created with default values for the resource parameters. Table 14
lists the various resource parameters and their default values.
Table 14 CacheFS Resource Parameters
Default ValueCacheFS Resource Parameter
90maxblocks
0minblocks
85threshblocks
90maxfiles
0minfiles
85threshfiles
For more information on the resource parameters, see cfsadmin(1M).
You can update the resource parameters using the -u option of the cfsadmin command.
NOTE: All filesystems in the cache directory must be unmounted when you use the -u option.
Changes will be effective the next time you mount any filesystem in the specified cache directory.
For example, to update the resource parameter, maxblocks, you must first create the cache, and
then modify the parameter as follows:
88 Configuring and Administering a Cache Filesystem