System Administration Guide, Volume 1

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:
password:
# 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