NFS Services Administrator's Guide (B.11.31.05) September 2009

Deleting a Cache Directory
To delete a cache directory that is no longer required you must use the cfsadmin command.
The syntax to delete the cache directory is as follows:
cfsadmin -d {cacheID | all} cache-directory
where:
cacheID
Specifies the name of the cache filesystem.
all Specifies that all cached filesystems in the cache-directory are to
be deleted.
cache-directory
Specifies the name of the cache directory where the cache resides.
NOTE: The cache directory must not be in use when attempting to delete a cached filesystem
or the cache directory.
To delete the cache directory, follow these steps:
1. To identify the Cache ID of each of the cached filesystems, enter the following command:
cfsadmin -l cache-directory
An output similar to the following is displayed:
cfsadmin: list cache FS information
maxblocks 90%
minblocks 0%
threshblocks 85%
maxfiles 91%
minfiles 0%
threshfiles 85%
maxfilesize 3MB
srv01:_tmp:_mnt
srv01:_tmp:_mnt1
At the end of the output, the Cache IDs of all the cached filesystems that are using this cache
directory are displayed. In this example, the/tmp directory of srv01 is mounted on mnt
and mnt1.
2. To list the CacheFS mount-points that are using the cache directory, enter the following
command:
mount | grep -w "cachedir=/disk2/cache" | awk '{print $1}'
An output similar to the following is displayed if CacheFS mount-points are using the cache
directory:
/mnt
/mnt1
3. To unmount the CacheFS mount-points, /_mnt, and /_mnt1, enter the following commands:
umount /mnt
umount /mnt1
4. To delete the CacheFS filesystem corresponding to the Cache ID from the specified cache
directory, enter the following command:
cfsadmin -d CacheID cache-directory
5. To verify if the CacheFS filesystem is deleted, enter the following command:
cfsadmin -l cache-directory
An output similar to the following is displayed:
cfsadmin: list cache FS information
maxblocks 90%
minblocks 0%
threshblocks 85%
Configuring and Administering CacheFS 91