Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Last active November 16, 2022 17:29
Show Gist options
  • Save mallendeo/82c8613267e3161ba362ce56611f50cf to your computer and use it in GitHub Desktop.
Save mallendeo/82c8613267e3161ba362ce56611f50cf to your computer and use it in GitHub Desktop.
Mount encrypted ZFS on Ubuntu
sudo apt install zfsutils-linux
export ZFS_DISK=usb-Realtek_RTL_012345679039-0\:0-part2
export ZFS_POOL=backup
export ZFS_DATASET=some_dataset

sudo zpool import -d $ZFS_DISK $ZFS_POOL

sudo zfs load-key -a

sudo zfs set mountpoint=/mnt/zfs $ZFS_POOL/$ZFS_DATASET
sudo zfs mount $ZFS_POOL/$ZFS_DATASET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment