The copies Property

As a reliability feature, ZFS file system metadata is automatically stored multiple times across different disks, if possible. This feature is known as ditto blocks.

In this release, you can also store multiple copies of user data is also stored per file system by using the zfs set copies command. For example:

$ zfs set copies=2 users/home
$ zfs get copies users/home
NAME        PROPERTY  VALUE       SOURCE
users/home  copies    2           local

Available values are 1, 2, or 3. The default value is 1. These copies are in addition to any pool-level redundancy, such as in a mirrored or RAID-Z configuration.

The benefits of storing multiple copies of ZFS user data are as follows:

  • Improves data retention by enabling recovery from unrecoverable block read faults, such as media faults (commonly known as bit rot) for all ZFS configurations.

  • Provides data protection, even when only a single disk is available.

  • Enables you to select data protection policies on a per-file system basis, beyond the capabilities of the storage pool.

Note:

Depending on the allocation of the ditto blocks in the storage pool, multiple copies might be placed on a single disk. A subsequent full disk failure might cause all ditto blocks to be unavailable.

You might consider using ditto blocks when you accidentally create a non-redundant pool and when you need to set data retention policies.