NFS Services Administrator's Guide (B.11.31.03) August 2008
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 114)
• “Mounting an NFS Filesystem Using CacheFS” (page 114)
• “Automounting a Filesystem Using CacheFS” (page 116)
• “Enabling Logging in CacheFS” (page 117)
• “Disabling Logging in CacheFS” (page 117)
• “Caching a Complete Binary” (page 118)
• “Packing a Cached Filesystem” (page 118)
• “Forcing a Cache Consistency Check” (page 120)
• “Unmounting a Cache Filesystem” (page 121)
• “Checking the Integrity of a Cache” (page 121)
• “Deleting a Cache Directory” (page 122)
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
114 Configuring and Administering a Cache Filesystem