Zfs send a replication stream from unencrypted pool to encrypted pool

This is why I use “pseudo-root” datasets.

flowchart TD

nas1[("tank\n(pool)")]
nas1root("tank\n(root dataset)")
zroot1("zroot1\n(pseudo-root)")
zroot2("zroot2\n(pseudo-root)")
zroot3("zroot3\n(pseudo-root)")
dsArchives("archives")
dsDownloads("downloads")
dsDocs("documents")
dsMedia("media")
dsPictures("pictures")
dsStaging("staging")
dsTemp("temporary")

style nas1 stroke-width:4px
style nas1root stroke-width:4px
style zroot1 stroke:green,stroke-width:4px
style zroot2 stroke:blue,stroke-width:4px
style zroot3 stroke:red,stroke-width:4px
style dsArchives stroke:green
style dsDocs stroke:green
style dsPictures stroke:green
style dsMedia stroke:blue
style dsDownloads stroke:blue
style dsStaging stroke:red
style dsTemp stroke:red

nas1 === nas1root
linkStyle 0 stroke-width:6px
nas1root --- zroot1
nas1root --- zroot2
nas1root --- zroot3
zroot1 --- dsArchives
zroot1 --- dsDocs
zroot1 --- dsPictures
zroot2 --- dsMedia
zroot2 --- dsDownloads
zroot3 --- dsStaging
zroot3 --- dsTemp

In your case, for this one-time migration, you’ll have to do a replication for each dataset that is one level below the “tank” root dataset. (The -x flag will work in that case.)

When it comes to top-level root datasets, there is zero flexibility. You cannot overwrite them; not even with another source’s root dataset.

This is another grievance I have with the original ZFS design of a pool and its root dataset. But that’s another story…

2 Likes