System Administration Guide

How to Delete a Cached File System

  1. Become superuser.

  2. Unmount all the file systems in the cache.


    # umount mount-point
    

    mount-point specifies the directory where a file system or file systems are mounted.

  3. Determine the cache ID from the cfsadmin -l output, as follows:


    # cfsadmin -l cache-directory
    cfsadmin: list cache FS information
       maxblocks     90%
       minblocks      0%
       threshblocks  85%
       maxfiles      90%
       minfiles       0%
       threshfiles   85%
       maxfilesize    3MB
    cache-directory
    #
  4. Delete a cached file system from a specified cache.


    # cfsadmin -d cache-id cache-directory
    

    cache-id

    Indicates the name of the cached file system, which is the last line of the cfsadmin -l output. See "How to Display Information About Cached File Systems" for more information. You can delete all the cached file systems in a particular cache by specifying all for cache-id.

    cache-directory

    Specifies the directory where the cache resides. 

  5. Verify that the file system has been deleted.

    The cache ID of the file system you just deleted should be missing from the output of the following command. Refer to the cfsadmin(1M) manpage for more information about the fields specified in the command output.


    # cfsadmin -l cache-directory
    cfsadmin: list cache FS information
       maxblocks     90%
       minblocks      0%
       threshblocks  85%
       maxfiles      90%
       minfiles       0%
       threshfiles   85%
       maxfilesize    3MB
    # 

Examples--Deleting a Cached File System

The following example unmounts a cached file system and deletes the cached file system from the cache.


# umount /usr/openwin
# cfsadmin -d merlin:docs /docs /local/mycache

The following example deletes all the cached file systems in the /local/mycache cache. This also deletes the cache.


# cfsadmin -d all /local/mycache