Storage Encryption
8 minute read.
Last Modified 2022-09-27 15:13 -0400TrueNAS supports different encryption options for critical data.
Users are responsible for backing up and securing encryption keys and passphrases! Losing the ability to decrypt data is similar to a catastrophic data loss.
Data-at-rest encryption is available with:
- Self Encrypting Drives (SEDs) using OPAL or FIPS 140.2 (Both AES 256)
- Encryption of specific datasets (AES-256-GCM in TrueNAS 12.0)
The local TrueNAS system manages keys for data-at-rest. The user is responsible for storing and securing their keys. The Key Management Interface Protocol (KMIP) is included in TrueNAS 12.0.
Encrypting the root dataset of a new storage pool further increases data security. Create a new pool and set Encryption in the Pool Manager. TrueNAS shows a warning.
Read the warning, select Confirm, and click I Understand.
We recommend using the default encryption in Cipher, but other ciphers are available.
TrueNAS can encrypt new datasets within an existing unencrypted storage pool without having to encrypt the entire pool. To encrypt a single dataset, go to Storage > Pools, open the more_vert for an existing dataset, and click Add Dataset.
In the Encryption Options area, unset Inherit and check Encryption.
Now select the authentication to use from the two options in Type: either a Key or Passphrase. The remaining options are the same as a new pool. Datasets with encryption enabled show additional icons in the Storage > Pools list.
The dataset locked/unlocked status is determined from an icon:
- The dataset unlocked icon: lock_open.
- The dataset locked icon: lock.
- A Dataset on an encrypted pool with encryption properties that don’t match the root dataset have this icon:
NOTE: An unencrypted pool with an encrypted dataset also shows this icon:
Encrypted datasets can only be locked and unlocked when secured with a passphrase instead of a keyfile. Before locking a dataset, verify that it is not currently in use, then click (Options) and Lock.
Use the Force unmount option only if you are certain no one is currently accessing the dataset. After locking a dataset, the unlock icon changes to a locked icon. While the dataset is locked, it is not available for use.
To unlock a dataset, click more_vert and Unlock.
Enter the passphrase and click Submit. To unlock child datasets, select Unlock Children. Child datasets that inherited encryption settings from the parent dataset unlock when the parent unlocks. Users can unlock child datasets with different passphrases as the parent simultaneously by entering their passphrases.
Confirm unlocking the datasets and wait for a dialog to show the unlock is successful.
There are two ways to manage the encryption credentials: with Key Files or Passphrases:
Always back up the key file to a safe and secure location!
TrueNAS Enterprise users may connect a Key Management Interoperability Protocol (KMIP) server to centralize keys when they are not using passphrases to unlock a dataset or zvol.
Users with TrueNAS CORE or Enterprise installations without KMIP should either replicate the dataset or zvol without properties to disable encryption at the remote end or construct a special json manifest to unlock each child dataset/zvol with a unique key.
This does not affect TrueNAS Enterprise installs with KMIP.
TrueNAS no longer supports GELI encryption (deprecated).
Data can be migrated from the GELI-encrypted pool to a new ZFS-encrypted pool. Be sure to unlock the GELI-encrypted pool before attempting any data migrations. The new ZFS-encrypted pool must be at least the same size as the previous GELI-encrypted pool. Do not delete the GELI dataset until you have verified the data migration.
There are a few options to migrate data from a GELI-encrypted pool to a new ZFS-encrypted pool: