Replication Task to new NAS/Server without Sub-Datasets being encrypted

Zyrox

Dabbler
Joined
Aug 7, 2019
Messages
10
Hi guys,

I have two TrueNAS servers one is Core one is Scale. I ran a replication task to the new pool (to the Core one).
It ended up with a mess, so every dataset and sub-dataset and sub-dataset of it ended up with an encrypted dataset inside this encrypted pool "tank3".

Is there a way to apply the tank3 encryption to all datasets? Or alternatively is there a option under replication tasks that I have to check?
In the past I tested zfs send & recv and I was able to replicate so that only the main dataset has an encryption but not any single sub-dataset.

And what happens if I do a replication task from my other old pool tank2 to my new pool tank3? This tank2 has the same datasets structure(with other encryption key) and maybe same folders or data within a dataset.

Thanks
 

irTwit

Dabbler
Joined
Aug 18, 2014
Messages
48
In my replications I have "Include Dataset Properties" checked. The message says "Warning: You are replicating encrypted dataset(s) 'pool/dataset' with properties. Destination datasets will be locked and can be unlocked with source datasets' encryption key."

You could also try enabling encryption inheritance after the initial replication. Click the 3-dots next to each replicated dataset then encryption options. Check "Inherit encryption properties from parent". Test it out, I think it will stick for future replications, but no guarantees.
 

Zyrox

Dabbler
Joined
Aug 7, 2019
Messages
10
Click the 3-dots next to each replicated dataset then encryption options. Check "Inherit encryption properties from parent".
Thanks irTwit! That worked, a bit inconvenient because I had to do that step for 30 datasets + the encryption step so overall it did feel like 2k clicks. I had few issues/bugs, too.

  1. I've those encryption keys, but they didn't work. They are each a .json file, not a .key file. I don't know why? Inside the JSON is a hex key that works. But instead of only having to enter the key once, as with the key file, you then have to do it for each dataset, so it was really an unnecessarily time-consuming affair.
  2. The other problem was that my replicated pool showed up correctly with all sub-Datasets and 12TB on "Storage/Pools", but as I tried to rsync a data of these dataset, it doesn't work, and also "mv" doesn't. That was so strange. I found out that "ls /mnt/tank/tank2" did also say there is no folder/Dataset in it. I could recover snapshots but also only a single snapshot at once, also strange.
  3. So I deleted that 12TB Dataset and know I do the a complete new replication task without "Include Dataset Properties", next strange thing is that I deleted that dataset and all snapshots before, but the 12TB are still used, but why? Does the "Replication Task" allocate the necessary memory?
If that is so it's fine. If not I have not enough space left for the complete Replication Task.
 
Top