In writeback mode, the SmartIO feature caches the VxFS file system read and write I/Os. To set up SmartIO for write-back caching for a VxFS file system, create the cache area and mount the file system in writeback mode.
Setting up SmartIO write-back caching for VxFS file systems
Specify one or more devices using the disk access name (daname) of the device. The device should be initialized for VxVM use and have the cdsdisk
format.
# sfcache create [-t VxFS] [size] daname[...] [--auto|--noauto] \ [--nostripe|ncols=N] [cachearea_name]
Where:
daname specifies the disk access name of the device on which to create the cache area.
cachearea_name specifies a customized name for the cache area. If unspecified, the SmartIO feature automatically generates a name for the cache area.
size specifies the size for the cache area. By default, the cache area uses all of the available space on the device.
--noauto|--auto specifies the type of cache area. The default is --auto.
For example:
# sfcache create ssd0_0
--nostripe|ncols=n specifies the layout options for the cache area. By default, the cache area is created over a striped volume if two or more disks are specified. Use the ncols=n option to specify the number of columns for the striped volume. Use the --nostripe option to create the cache area on a concatenated volume over the specified disks.
Alternatively, you can specify the name of a disk group and a volume to use for the cache area. In this case, you cannot specify a size: the cache area uses the entire volume.
# sfcache create [-t VxFS] [--noauto|--auto] dg/vol
Where:
--noauto|--auto specifies the type of cache area. The default is --auto.
dg/vol specifies the disk group name and volume name that you want to use for the cache area. SmartIO uses this name for the cache area.
For example:
# sfcache create --auto ssd_dg/ssd_vol
Example of local mount:
# mount -F vxfs -o smartiomode=writeback /dev/vx/dsk/testdg/vol1 \ /mnt1
Example of remount:
# mount -F vxfs -o remount,smartiomode=writeback \ /dev/vx/dsk/testdg/vol1 /mnt1
For a cluster file system, the file system must be mounted on both the nodes with the smartiomode and cluster options set.
When you mount the CFS file system with these options, SmartIO automatically reflects the cache on the other node's SSD cache.
Example of CFS mount:
# mount -F vxfs -o cluster,smartiomode=writeback \ /dev/vx/dsk/testdg/vol1 /mnt1
To enable write-back caching, the smartiomode option must be set to writeback regardless of whether the cache area is auto or noauto. If the cache area is auto and the smartiomode is not set, SmartIO caching is enabled in the default read mode for the file system.