htcformat command

Purpose

Use the htcformat command to prepare a raw device or file to hold the proxy cache. This format command must be used before the device is specified for use with the proxy cache.

The device path must specify the raw device. See your file system documentation for details on how to access raw devices. Examples are available in Configuring proxy server caching.

Note:
Linux 2.2 kernels do not support caching to raw devices. On Linux platforms, only files and memory can be used for cache storage.

The minimum size for a Caching Proxy cache is 16392 KB, which is 2049 blocks.

Format

htcformat device [-blocksize <block size>] [-blocks number of blocks]
htcformat -file filepath [-blocksize block size] -blocks number of blocks

Parameters

-blocksize
This sets the size of blocks in the medium of the cache device. Block size is in bytes. The default is 8192 and should be used for all situations.
-blocks
Number of blocks to create on the device or in the file. When formatting a file, this argument is required in order to specify the file size. This argument also can be used to limit the amount of a particular device or partition to be used for cache storage. If no blocks argument is specified, as many blocks as will fit on the partition will be created.
-file
Format a file instead of a storage device.

Usage

The caching system additionally segregates cache files or devices into containers for indexing and garbage collection. The size of containers is set to a certain number of blocks; container size cannot be configured. In order for garbage collection to run, a minimum of two containers is required; the minimum cache size is 16392 KB.

The htcformat command rejects a format request that yields a cache device with fewer than two containers.

Examples

The following example formats a disk partition called c0t0d0s0 on Solaris.

htcformat /dev/rdsk/c0t0d0s0 

The following example formats a disk partition called lv02 on AIX.

htcformat /dev/rlv02

The following example formats a disk partition called d: on Windows.

htcformat \\.\d:

The following example formats a file named filecache to be about 1 GB large.

htcformat -file /opt/ibm/edge/cp/filecache -blocks 131072