I would like to convert a lot of ZFS datasets I have on a (Ubuntu 20.04) server (about 3 TB of data). I've already tested this a bit, and what I've been doing so far is:
- Create a new encrypted dataset with
zfs create -o encryption=on -o keyformat=passphrase -o mountpoint=/mnt/encrypted tank/encrypted
rsync
all the data from the (mounted) unencrypted dataset, i.e/opt/stuff
to the encrypted dataset's mount (/mnt/encrypted
)- Remove the unencrypted dataset.
- Change the mountpoint for the encrypted dataset, from
/mnt/encrypted
to/opt/stuff
.
The method above works, but maybe there's something in ZFS that would make it easier, and perhaps even let me keep my snapshots and encrypt those (ZFS forums say no to the last point tho).
0 Answers