example with key
zfs create -o encryption=on rpool/cryptfs
Enter passphrase for 'rpool/cryptfs':
Enter again:
zfs snapshot rpool/cryptfs@snap1
zfs clone rpool/cryptfs@snap1 rpool/cryptclone
Enter passphrase for 'rpool/cryptclone':
Enter again:
example with keyfile
# pktool genkey keystore=pkcs11 keytype=aes keylen=128 label=mykey
Enter PIN for Sun Software PKCS#11 softtoken:
# zfs create -o encryption=on -o keysource=raw,pkcs11:object=mykey tank/project/C
Enter PKCS#11 token PIN for 'tank/project/C':