NFS Services Administrator's Guide
Configuring and Administering a Cache Filesystem
Configuring CacheFS
Chapter 4 153
Mounting an NFS Filesystem using CacheFS
This section describes how to mount an NFS filesystem using CacheFS.
Before you mount an NFS filesystem with CacheFS, you must configure
a directory in a local filesystem as cache. For information on how to
configure a directory as cache, see “Configuring Cache in a Local
Filesystem” on page 152.
Following is the syntax for mounting an NFS filesystem with CacheFS:
mount [-F cachefs] [-rqOV] -o backfstype=file_system_type
[specific_options] resource mount_point
To mount an NFS filesystem using CacheFS, follow these steps:
1. Enter the following command to mount an NFS filesystem using
CacheFS:
mount -F cachefs -o backfstype=nfs,cachedir=/disk2/cache \
nfsserver:/opt/frame /opt/cframe
In this example, the /opt/frame directory is NFS-mounted from the
NFS server nfsserver to the local /opt/cframe directory. The
/opt/frame directory can now be accessed like any mounted
filesystem. When data in /opt/frame is referenced, it is copied into
/disk2/cache.
NOTE For HP-UX 11i v3, NFSv3 is the default NFS version. If NFSv4 is
specified as the default NFS version, the CacheFS mount fails.
2. If you require the CacheFS filesystem to be mounted at system boot,
add the following line to the /etc/fstab file , as shown in the
following example:
nfsserver:/opt/frame /opt/cframe cachefs \
backfstype=nfs,cachedir=/disk2/cache
The data is read across the network from the NFS server when accessed
for the first time. All future accesses to the data are served from the local
cache, if the data is not modified.
For more information on the various mount options of the CacheFS
filesystem, see mount_cachefs (1M).