Removing a device from the cache area

If the cache area spans more than one device, you can remove one of the devices from the cache area.

To remove a device from a cache area

  1. Make sure that the cache will fit on the remaining devices after you remove the device. If necessary, resize the cache to a size smaller than the size of the remaining devices.

    If you shrink a VxFS cache area, all of the cached data (including statistics) might be evicted.

    # sfcache resize newsize cachearea_name

    For example, suppose the current cache area sfcachearea_1 has a maximum size of 5G. You want to remove an SSD ssd0_0 that is 2G. First, resize the cache area to 2.5G:

    # sfcache resize 2.5g sfcachearea_1
  2. To remove a device from a cache area, specify the device by the disk access name to remove the cache area.
    # sfcache rmdev [daname ...]

    For example, to remove the SSD ssd0_0:

    # sfcache rmdev ssd0_0
  3. Optionally, you can use the maxsize option to resize the cache area to the maximum size that fits on the remaining devices in the cache area.
    # sfcache resize maxsize cachearea_name

    For example:

    # sfcache resize maxsize sfcachearea_1