NFS Services Administrator's Guide
Configuring and Administering a Cache Filesystem
Configuring CacheFS
Chapter 4154
Automounting a Filesystem Using CacheFS
This section describes how to automount a filesystem using CacheFS.
Before you automount an NFS filesystem with CacheFS, you must
configure a directory in a local filesystem as cache. For more information
on how to configure a directory as cache, see “Configuring Cache in a
Local Filesystem” on page 152.
To automount a filesystem using CacheFS, follow these steps:
1. Add a line for the automounted filesystem to the appropriate AutoFS
direct or indirect map, as in the following examples:
Example 1
# direct map example:
/usr/dist -ro,nosuid,fstype=cachefs,backfstype=nfs, \
cachedir=/disk2/cache distserver:/export/dist
Example 2
# indirect map example:
proj1 -nosuid,fstype=cachefs,backfstype=nfs,\
cachedir=/disk2/cache \
/src testbox1:/export/proj1/src
/data testbox2:/export/proj1/data
2. If you modified a direct map, enter the following command on each
NFS client that will use the map, to force AutoFS to reread its maps:
/usr/sbin/automount
You can specify caching in an NIS AutoFS map, or with LDAP, only if all
clients who use the map have their caching directory set up in the same
location (/disk2/cache in the examples).
For more information on CacheFS, see the mount (1M), and
mount_cachefs (1M).