# Administration Reference

## Vn

Purpose

Houses a chunk of AFS data in the disk cache

Description

A V n file can store a chunk of cached AFS data on a client machine that is using a disk cache. As the Cache Manager initializes, it verifies that the local disk cache directory houses a number of V n files equal to the largest of the following:

- 100

- One and a half times the result of dividing the cache size by the chunk size (cachesize/chunksize * 1.5)

- The result of dividing the cache size by 10 MB (10,240)

The Cache Manager determines the cache size from the -blocks argument to the afsd command, or if the argument is not included, from the third field of the /usr/vice/etc/cacheinfo file. The default chunk size is 64 KB; use the -chunksize argument to the afsd command to override it. To override the default number of chunks resulting from the calculation, include the -files argument to the afsd command. The afsd reference page describes the restrictions on acceptable values for each of the arguments.

If the disk cache directory houses fewer V n files than necessary, the Cache Manager creates new ones, assigning each a unique integer n that distinguishes it from the other files; the integers start with 1 and increment by one for each V n file created. The Cache Manager removes files if there are more than necessary. The Cache Manager also adds and removes V n files in response to the fs setcachesize command, which can be used to alter the cache size between reboots.

The standard disk cache directory name is /usr/vice/cache, but it is acceptable to use a directory on a partition with more available space. To designate a different directory, change the value in the second field of the /usr/vice/etc/cacheinfo file before issuing the afsd command, or include the -cachedir argument to the afsd command.

V n files expand and contract to accommodate the size of the AFS directory listing or file they temporarily house. As mentioned, by default each V n file holds up to 64 KB (65,536 bytes) of a cached AFS element. AFS elements larger than 64 KB are divided among multiple V n files. If an element is smaller than 64 KB, the V n file expands only to the required size. A V n file accommodates only a single element, so if there many small cached elements, it is possible to exhaust the available V n files without reaching the maximum cache size.

Cautions

Editing or removing a V n file can cause a kernel panic. To alter cache size (and thus the number of V n files) between reboots, use the fs setcachesize command. Alternatively, alter the value of the -blocks, -files or -chunksize arguments to the afsd command invoked in the machine's AFS initialization file, and reboot. To refresh the contents of one or more V n files, use the fs flush or fs flushvolume command. If a V n file is accidentally modified or deleted, rebooting the machine usually restores normal performance.

Related Information

cacheinfo

afsd

fs flush

fs flushvolume

fs setcachesize

© IBM Corporation 2000. All Rights Reserved