Review the following recommendations when adding flash devices as ZFS log or cache devices.
A ZFS log or cache device can be added to an existing ZFS storage pool by using the zpool add command. Be very careful with zpool add commands. Mistakenly adding a log device as a normal pool device is a mistake that will require you to destroy and restore the pool from scratch. Individual log devices themselves can be removed from a pool.
Familiarize yourself with the zpool add command before attempting this operation on active storage. You can use the zpool add –n option to preview the configuration without creating the configuration. For example, the following incorrect zpool add preview syntax attempts to add a device as a log device:
# zpool add -n tank c4t1d0 vdev verification failed: use -f to override the following errors: mismatched replication level: pool uses mirror and new vdev is disk Unable to build pool from specified devices: invalid vdev configuration
This is the correct zpool add preview syntax for adding a log device to an existing pool:
# zpool add -n tank log c4t1d0 would update 'tank' to the following configuration: tank mirror c4t0d0 c5t0d0 logs c4t1d0
If multiple devices are specified, they are striped together. For more information, see the examples below or zpool(1M).
A flash device, c4t1d0, can be added as a ZFS log device:
# zpool add pool log c4t1d0
If 2 flash devices are available, you can add mirrored log devices:
# zpool add pool log mirror c4t1d0 c4t2d0
Available flash devices can be added as a cache device for reads.
# zpool add pool cache c4t3d0
You can't mirror cache devices, they will be striped together.
# zpool add pool cache c4t3d0 c4t4d0