NFS Services Administrator's Guide (B.11.31.03) August 2008

IMPORTANT: The -s option works only if CacheFS is mounted with the demandconst
option. For information and an example on how to switch between mount options, see
“Switching Mount Options” (page 115)
Forcing a Consistency Check for all the Mount-Points
To request for a consistency check on all the mount-points, enter the following
command:
cfsadmin -s all
For information on cfsadmin options, see cfsadmin(1M).
Unmounting a Cache Filesystem
To unmount a Cache filesystem, enter the following command:
umount mount-point
where:
mount-point
Specifies the CacheFS mount-point that you want to unmount.
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:
Configuring and Administering CacheFS 121