System Administration Guide, Volume 1

How to Check the Integrity of Cached File Systems

Use the fsck command to check the integrity of cached file systems. The CacheFS version of fsck automatically corrects problems without requiring user interaction. You should not need to run fsck manually for cached file systems; fsck is run automatically at boot time or when the file system is mounted. If you want to manually check the integrity, you can use the following procedure.

See fsck_cachefs(1M) for more information.

  1. Become superuser.

  2. Check the cached file systems under a specified cache.

    # fsck -F cachefs [-m -o noclean] cache-directory


    Causes fsck to check the cached file systems without making any repairs.

    -o noclean

    Forces a check on the cached file systems only. Does not make any repairs. 


    Indicates the name of the directory where the cache resides. 

Example--Checking the Integrity of Cached File Systems

The following example checks the cached file systems that are part of the /local/mycache cache.

# fsck -F cachefs /local/mycache