System Administration Guide, Volume 1

How to Modify File Systems in a Cache

For information on how to modify specific options of a file system, refer to Chapter 36, Mounting and Unmounting File Systems (Tasks). When you modify a file system in the cache, you need to delete the cache and then recreate it. You might also need to reboot your machine in single user mode, depending on how your file systems are shared and accessed.

The following example shows some of the steps involved in this procedure.

Example--Modifying File Systems in a Cache

In the following example, the cache is deleted, then re-created, and then mounted again with the demandconst option specified for the file system /docs. This example shows the steps including rebooting to single user mode. You might have other commands you prefer to use to accomplish some of the tasks shown in this example.

# shutdown -g30 -y
Type Cntrl-d to proceed with normal startup,
(or give root password for system maintenance):
# enter password:
Here is where you might be prompted from system to run fsck on the 
file system where the cache is located.
# fsck /local
# mount /local
# cfsadmin -d all /local/mycache
# cfsadmin -c /local/mycache
# init 6
console login:
# mount -F cachefs -o backfstype=nfs,cachedir=/local/cache1, demandconst merlin:/docs /docs 

If you did not successfully remount the file system in the cache, the system displays an error message similar to the following:

cachefsstat: /doc: not a cachefs mount point