Forrest logo
back to the zpool tool

zpool:tldr:dd04e

zpool: Add a cache (L2ARC) device to a zpool.
$ zpool add ${pool_name} cache ${cache_disk}
try on your machine

The command "zpool add ${pool_name} cache ${cache_disk}" is used to add a cache device to a ZFS storage pool.

Here's an explanation of each part of the command:

  • "zpool add": This is the command to add a new component to an existing ZFS storage pool.

  • "${pool_name}": This is a placeholder for the name of the ZFS storage pool to which you want to add the cache device. You need to replace "${pool_name}" with the actual name of the pool you want to modify.

  • "cache": This keyword specifies that you want to add a cache device to the storage pool.

  • "${cache_disk}": This is a placeholder for the name or identifier of the disk or partition that you want to use as a cache device. You need to replace "${cache_disk}" with the actual name or identifier of the disk or partition you want to add as a cache.

To use this command, you need to have administrative privileges (or root access) on the system. It is also important to ensure that the disk or partition you want to add as a cache device is not already part of the storage pool, as a disk can only be used either as a cache device or a regular data device within a pool, but not both.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the zpool tool