NFS Services Administrator's Guide (B.11.31.04) March 2009

Configuring and Administering CacheFS
You can use CacheFS to cache both manually mounted NFS filesystems or automatically
mounted NFS filesystems. All CacheFS operations, except displaying CacheFS statistics,
require superuser permissions.
This section describes the tasks to configure and administer CacheFS:
“Creating a CacheFS Cache” (page 112)
“Mounting an NFS Filesystem Using CacheFS” (page 112)
Automounting a Filesystem Using CacheFS” (page 114)
“Enabling Logging in CacheFS” (page 115)
“Disabling Logging in CacheFS” (page 115)
“Caching a Complete Binary” (page 116)
“Packing a Cached Filesystem” (page 116)
“Forcing a Cache Consistency Check” (page 118)
“Unmounting a Cache Filesystem” (page 119)
“Checking the Integrity of a Cache” (page 119)
“Deleting a Cache Directory” (page 120)
Creating a CacheFS Cache
This section describes how to configure a cache directory in a local filesystem. To
configure a local filesystem as a cache directory, follow these steps:
1. Log in to the NFS client system as superuser.
2. Ensure that the disk partition containing the cache has enough space for the cache
directory. If does not have enough space, configure and mount a new HFS or VxFS
filesystem to be used as the front filesystem, where data will be cached.
3. To create a cache directory, enter the following command:
cfsadmin -c cache_directory
For example to create a CacheFS directory called /disk2/cache using the
following command:
cfsadmin -c /disk2/cache
This creates a new directory called cache under the /disk2 directory.
CacheFS allows more than one filesystem to be cached in the same cache. You need
not create a separate cache directory for each CacheFS mount.
Mounting an NFS Filesystem Using CacheFS
This section describes how to mount an NFS filesystem using CacheFS. The syntax for
mounting an NFS filesystem using CacheFS is as follows:
mount [-F cachefs] [-rqOV] -o backfstype=file_system_type
[specific_options] resource mount_point
112 Configuring and Administering a Cache Filesystem