ZFS with native encryption

zpool create -o ashift=12 -O compression=lz4 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa -O atime=off -O acltype=posixacl -O encryption=aes-256-gcm -O keylocation=prompt -O keyformat=passphrase tank0 mirror wwn-0x5000cca22dcbf093 wwn-0x5000cca22dd2fc89 mirror wwn-0x5000cca22dd31cdb wwn-0x5000cca22dd0624

encriptar partição em pen

Preparation

Prepare a mount point for your data and change ownership.
# Create a mount point
sudo mkdir /media/cryptoUSB
# Set permissions for the owner
sudo chown stefan:stefan /media/cryptoUSB

Create an Encrypted Device

Encrypt the device with LUKS. Note that all data on the partition will be overwritten during this process.
# Create encrypted device
sudo cryptsetup --verify-passphrase luksFormat /dev/sdX -c aes -s 256 -h sha256

Subscrever encrypt