Use this when encrypting ZFS datasets natively.
ZFS Encryption
ZFS native encryption encrypts datasets with AES-GCM, keeping keys per dataset. Encrypted datasets can be replicated with raw zfs send to a backup host that never needs the key.
1. ZFS native encryption per dataset (AES-256-GCM).
2. Keys loaded at boot or manually.
3. Raw sends replicate without decrypting.
4. Metadata partly visible (names, sizes).
5. Back up keys.
dataset → wrapping key → data keys → encrypted blocks
Context & applicabilityCommon mistakes · platform/version boundaries
- Key not loaded after reboot (
zfs load-key -a), so datasets stay unmounted. - Losing the key or passphrase — no recovery.
zfs sendwithout-w(raw), sending decrypted data to the backup target.- Expecting dedup to work across differently keyed datasets.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Encryption is per dataset.
- Raw zfs send replicates without the key.
- Key must be loaded after boot.
zfs get encryption,keyformat,keylocation,keystatus <ds>— encryption propszfs load-key <ds>— unlockzfs send -w <ds>@snap— raw encrypted send
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
ZFS native encryption encrypts datasets and zvols (AES-256-GCM by default) while leaving pool metadata readable, so scrubs, resilvers and raw sends work without keys.
zfs create -o encryption=on -o keyformat=passphrase tank/secure
zfs get encryption,keystatus,keylocation tank/secure
zfs load-key tank/secure; zfs mount tank/secure
zfs send -w tank/secure@snap | ssh backup zfs receive pool/secure # stays encrypted
Raw (-w) sends let an untrusted backup server store and replicate the dataset without ever having the key. Dedup and some metadata (dataset names, sizes) are not hidden.
ReferenceConfiguration & state2 sections · depth on demand
Commands
zfs create -o encryption=aes-256-gcm -o keyformat=passphrase tank/secure
zfs get encryption,keystatus,keylocation tank/secure
zfs load-key tank/secure ; zfs mount tank/secure
zfs send -w tank/secure@snap | ssh backup zfs recv pool/secure # raw send keeps it encrypted
Documented example, not captured output. Raw sends replicate encrypted data without exposing keys to the target. Metadata such as dataset names and sizes is not encrypted.
Commands
zfs create -o encryption=aes-256-gcm -o keyformat=passphrase tank/secure
zfs get encryption,keystatus,keylocation tank/secure
zfs load-key tank/secure ; zfs mount tank/secure
zfs send -w tank/secure@snap | ssh backup zfs recv pool/secure
Documented example, not captured output. -w sends encrypted blocks; the backup host never needs the key.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Data Protection → ZFS Encryption. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/sp/800/209/final · confidence 94%