Skip to content

Instantly share code, notes, and snippets.

@olegbliaher
Created March 12, 2021 08:57
Show Gist options
  • Save olegbliaher/0408bede690e701556316967dfbad190 to your computer and use it in GitHub Desktop.
Save olegbliaher/0408bede690e701556316967dfbad190 to your computer and use it in GitHub Desktop.
zfs tricks with and without encryption

Flag tricks:

zfs get all tank/dataset zpool get all tank

zfs set syncoid:no-sync=true tank/users/attie/scratch

zfs set com.sun:auto-snapshot=false tank1/container/child

zfs set snapdir=visible tank/test

Enable encryption:

zpool set feature@encryption=enabled <pool>

Create encrypted zpool:

zpool create -o feature@encryption=enabled -O encryption=on -O keyformat=passphrase tank2 /dev/sdb

zfs set checksum=skein tank2

Moving unencrypted dataset to encrypted:

  • Might have to zfs mount -l tank/encrypted-dataset first
  • zfs send -v tank/home@firstsnapshot | zfs recv -u -x encryption tank/encrypted/oldhome
  • zfs send -v -I  tank/home@firstsnapshot tank/home@latestsnapshot| zfs recv -Fu -x encryption tank/encrypted/oldhome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment