ZFS - Pools - Use Encryption with a ZFS Pool

After creating a ZFS storage pool, encryption can be enabled on it.


sudo zfs create -o encryption=on -o keylocation=prompt -o keyformat=passphrase testpool/encrypted

NOTE: You will be asked to enter the passphrase twice.

  • Enter your passphrase and continue.

NOTE: A new directory will be created under the storage mount point and anything under this directory will be encrypted.

  • Whenever the system is rebooted, you may need to manually mount the dataset.
  • Remember to use the -l flag when mounting the encrypted dataset.
  • You will be prompted for the passphrase, supply the passphrase you have used to encrypt the pool, and continue.
sudo zfs mount -l testpool/encrypted

Check the Mount

df -hT | grep zfs