System Administration Guide: Basic Administration

How to Mount a CacheFS File System (AutoFS)

You can mount a file system in a cache with AutoFS by specifying the -fstype=cachefs mount option in your automount map. Note that the CacheFS mount options, for example, backfstype and cachedir, are also specified in the automount map. For details on automount maps, see automount(1M).

  1. Become superuser on the client system.

  2. Using an editor, add the following line to the auto_direct map:

    /mount-point -fstype=cachefs,cachedir=/directory,backfstype=nfs 
  3. Using an editor, add the following line to the auto_master map:


    The /- entry is a pointer to check the auto_direct map.

  4. Reboot the system.

  5. Verify that the entry was made correctly by changing to the file system you mounted in the cache, and then list the contents, as follows:

    # cd /filesystem
    # ls 

For more information about AutoFS and how to edit the maps, refer to “Task Overview for Autofs Administration” in System Administration Guide: Resource Management and Network Services.

Example—Mounting a CacheFS File System (AutoFS)

The following auto_direct entry automatically mounts the CacheFS file system in the /docs directory.

/docs -fstype=cachefs,cachedir=/local/mycache,backfstype=nfs merlin:/docs