Data protection beyond the pool

Many people are flocking towards ZFS solutions because of the sound, fundamental science behind ZFS and the features it provides. Two features which complete the hybrid storage pool design are separate logs and cache devices.

  • Separate log devices allow you to direct synchronous write I/O destined for the ZFS Intent Log (ZIL), away from the main pool and towards devices which are optimized for low-latency writes. One of the best examples of a separate log device, highly optimized for low-latency writes, is the DDRdrive X1.
  • Cache devices allow you to extend the RAM-based Adaptive Replacement Cache (ARC) by adding cache devices as a second-level cache (L2ARC). If the random read performance of the cache devices is much better than the rand read performance of the pool, then cache devices are more cost-effective than adding RAM to enlarge the ARC.
The data retention policies of the separate log and cache devices are quite different.

The cache device contains data that already exists on the pool devices. If a cache device fails, then a read access is treated as a cache miss and the data is retrieved from the pool. Sure, there might be a slight performance hit, but data is not compromised. Therefore, ZFS does not offer data protection (mirroring) for the cache devices.

Separate log devices contain data that is not yet written to the pool. If the separate log device fails while the pool is imported, then the device is taken offline and writes are sent to the pool. If the entire log device fails when the pool is exported, then ZFS will not allow the pool to be imported because it cannot determine if data has been lost. Hence, for separate log devices, ZFS offers mirroring to protect the data that has not yet been written to the pool.

Bottom line, if you are very concerned about the data retention of the pool and desire the cost-effective and high performance of the separate log and cache devices, then consider mirroring your separate log devices and don't worry about the cache devices.