Hi all, first-time Discourse user, and about five years of ZFS on Linux user here.
I wonder if there is a way to recreate a ZFS-natively encrypted zpool from a backup, using exactly the same encryption IVs (initialization vectors) as before?
For example, if a primary zpool (encrypted, with the root filesystem encryptionroot for all children) fails due to broken hardware, but snapshots have been replicated to a backup storage, the original zpool can be recreated on a fresh drive and data can be restored - But one cannot use raw sends from backup to get exactly the same state as before, since the root is now encrypted differently. (This is solvable if letting all second-level filesystems become their own encryptionroots.)
If I were to create a new encrypted pool, now that I have more ZFS experience, I would create an unencrypted zpool with canmount=off/mountpoint=none on the root filesystem, then create an encrypted child dataset with canmount=on and mountpoint=/, and place all other datasets under that one. And never bother with snapshoting or backing up the “formal” top-level zfs filesystem.
However, that is not possible if (for example) installing Ubuntu with encrypted ZFS-on-root, since the rpool root filesystem is encrypted. Recreating that kind of “rpool” means re-encrypting everything (not using raw sends) if restoring from a backup.
Have I misunderstood something in this description/discussion?
(To clarify: I could use the same encryption key on the new/recreated zpool as the original one, but that is not the same as storing the same ciphertext on disk. Also, using non-raw sends when restoring from backup means that the encryption key must be loaded on the backup zpool first, which negates a major security advantage: Namely, if the backup snapshots are stored on an untrusted system.)