vxcache - administer the cache object for space-optimized snapshots
vxcache [-g diskgroup] att volume cacheobj
vxcache [-g diskgroup] dis cachevol ...
vxcache [options] [-g diskgroup] growcacheby cacheobj lengthchange [attribute ...]
vxcache [options] [-g diskgroup] growcacheto cacheobj newlength [attribute ...]
vxcache [-g diskgroup] listvol cacheobj
vxcache [-g diskgroup] set attribute=value cacheobj ...
vxcache [options] [-g diskgroup] shrinkcacheby cacheobj lengthchange [attribute ...]
vxcache [options] [-g diskgroup] shrinkcacheto cacheobj newlength [attribute ...]
vxcache [-g diskgroup] start cacheobj ...
vxcache [-g diskgroup] stat [cacheobj ...]
vxcache [-f] [-g diskgroup] stop cacheobj...
The vxcache utility is used to administer a cache object that is associated with volumes that have one or more space-optimized snapshots. The cache object, cacheobj, and underlying cache volume, cachevol, may be shared between volumes in a disk group.
Attaches a volume as a cache volume to a cache object. If a valid cache object exists but the original cache volume has been removed, this operation may be used to attach a new volume as a cache volume to the cache object.
Dissociates one or more cache volumes from their cache objects.
Note First use the vxcache stop command to stop the cache objects.
Grows the cache by the specified amount, lengthchange.
Grows the cache to the specified length, newlength.
Prints a space-separated list of space-optimized instant snapshots that have been created on the specified cache object. This list is sorted by the timestamp on the snapshot. If two or more snapshots have the same timestamp, these snapshots are sorted in order of decreasing size.
Sets the value of an attribute for the specified cache objects. Values may be set for the autogrow, autogrowby, highwatermark and maxautogrow attributes. See the vxcached(1M) manual page for a description of these attributes.
Shrinks the cache by the specified amount, lengthchange.
Shrinks the cache to the specified length, newlength.
Starts cache objects and rebuilds the in-core mapping.
Prints space usage statistics for cache objects:
Total size of the cache volume in megabytes that is available to cache data. As a small amount of space is required to hold cache object metadata, this value is always smaller than the total size of the cache volume.
Size of the cache that is in use in megabytes and as a percentage.
Size of the cache that is available for use in megabytes and as a percentage.
Number of subdisks that have been created on the cache object.
If no cache objects are specified, statistics are displayed for all cache objects in the disk group.
Stops cache objects.
Note The -d and -n options apply only to the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto operations.
Specifies a file containing defaults for various attributes related to space allocation for growing and shrinking the cache. If not specified, this defaults to /etc/default/vxassist.
Forces the stop operation if any snapshots have been created on a cache object.
Specifies the disk group for the operation, either by disk group ID or by disk group name. If this option is not specified, the default disk group is determined using the rules given in the vxdg(1M) manual page.
Prevents the system defaults file being read.
Note These options apply only to the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto operations.
Some environments provide guidelines to optimize VxVM's interaction with intelligent storage systems. If these guidelines are present, VxVM follows them when allocating space for volumes.
The following options change the behavior of the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto operations:
Performs the specified vxcache task for the specified volume and ignores any storage-specific guidelines. Overriding the guidelines is not recommended as it can result in incompatible objects, or objects that cannot be administered by VxVM and any associated software that exploit storage-specific features.
Verifies that the vxcache task for the specified volume can be performed without violating any storage-specific guidelines, but does not commit or perform any task. If any guidelines are violated, vxcache exits with an error message.
Note These options need a separate license. Without the license, vxcache ignores the specified option.
Refer to the vendor-specific documentation for more information on how intelligent storage systems can interact with VxVM.
Create and enable a 1GB mirrored cache with a region size of 32KB:
vxassist -g mydg make cachevol 1g layout=mirror init=active \
vxmake -g mydg cache cobjmydg cachevolname=cachevol \
vxcache -g mydg start cobjmydg
Grow the cache volume, mydgcvol, that is associated with the cache object, mydgcobj, by 1GB:
vxcache -g mydg growcacheby mydgcobj 1g
Change the value of the maxautogrow attribute to 2GB for a cache:
vxcache -g mydg set maxautogrow=2g mydgcobj
Stop and restart the cache object, mydgcobj, which has entered the DETACHED state after a failed grow or shrink operation (the -f option to vxcache stop is required because snapshots exist on the cache object):
vxcache -f -g mydg stop mydgcobj
vxcache -g mydg start mydgcobj
Stop the cache object, mydgcobj, and dissociate the cache volume, mydgcvol, from it:
vxcache -g mydg stop mydgcobj
vxcache -g mydg dis mydgcvol
The attributes that may be specified with the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto keywords are the same as for the vxassist command. See the vxassist(1M) manual page for details.
The vxcached daemon monitors the usage of cache objects. See the vxcached(1M) manual page for details.
The size of a cache volume must be greater than or equal to 5m (5MB).
vxassist(1M), vxcached(1M), vxintro(1M), vxmake(1M), vxsnap(1M), vxstat(1M)