Administering volume snapshots 347

Creating instant snapshots

Caution: Ensure that the cache is sufficiently large, and that the autogrow attributes are configured correctly for your needs.

Growing and shrinking a cache

You can use the vxcache command to increase the size of the cache volume that is associated with a cache object:

#vxcache [-g diskgroup] growcacheto cache_object size

For example, to increase the size of the cache volume associated with the cache object, mycache, to 2GB, you would use the following command:

#vxcache -g mydg growcacheto mycache 2g

To grow a cache by a specified amount, use the following form of the command shown here:

#vxcache [-g diskgroup] growcacheby cache_object size

For example, the following command increases the size of mycache by 1GB:

#vxcache -g mydg growcacheby mycache 1g

You can similarly use the shrinkcacheby and shrinkcacheto operations to reduce the size of a cache. See the vxcache(1M) manual page for more information.

Removing a cache

To remove a cache completely, including the cache object, its cache volume and all space-optimized snapshots that use the cache:

1Run the following command to find out the names of the top-level snapshot volumes that are configured on the cache object:

#vxprint -g diskgroup -vne \

"v_plex.pl_subdisk.sd_dm_name ~ /cache_object/"

where cache_object is the name of the cache object.

2Remove all the top-level snapshots and their dependent snapshots (this can be done with a single command):

#vxedit -gdiskgroup -r rm snapvol ...

where snapvol is the name of a top-level snapshot volume.

3Stop the cache object:

# vxcache -gdiskgroup stop cache_object

4Finally, remove the cache object and its cache volume:

# vxedit -gdiskgroup -r rm cache_object