5

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:

  1. Create a new encrypted dataset with zfs create -o encryption=on -o keyformat=passphrase -o mountpoint=/mnt/encrypted tank/encrypted
  2. rsync all the data from the (mounted) unencrypted dataset, i.e /opt/stuff to the encrypted dataset's mount (/mnt/encrypted)
  3. Remove the unencrypted dataset.
  4. 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).

Oleg
  • 373
  • 1
  • 7
  • 17

0 Answers0