ZFS Replication for ZVOL

TheBearJew

Cadet
Joined
Nov 4, 2022
Messages
5
Hi all,

Happy New Year.

I'm able to successfully replicate datasets, but not zvols. Can you all help me with this? I've spent 6 hours trying, what's felt like, everything under the sun, but have had no success.

Here are the steps that I'm doing in order to recreate the issue. First my process for datasets.
  1. Plug in external drive.
  2. Go to Storage Dashboard and Create Pool (I'm wanting to backup my datasets and VM's to external disk/zfs pool)
  3. Name Pool "WesternDigitalBackup" - Enable Encryption - Create disk as single stripe - Create Pool - Download encryption key - Done.
  4. Go to Datasets
  5. Add Dataset to WesternDigitalBackup - Example:TEST. (My Tank-Rust pool has a dataset named TEST with random data)
  6. Encryption set to Inherit, Share Type set to SMB - Done.
  7. Go to Data Protection
  8. Add replication task
  9. Source Tank-Rust/Test - Destination WesternDigitalBackup/Test - Next
  10. When Run Once -Make Destination Dataset Read-only? YES - Save
  11. Process is running, check Datasets, data has copied, SUCCESS

Now, lets try zvols.

  1. Go back to step 4.
  2. Add Zvol on WesternDigitalBackup - Zvol name "WindowsTest-16eiki" (this was the name for the VM under Tank-Rust) - Size 80GiB (same as Tank-Rust) - Block size set to Inherit, everything else left as default. - SAVE
  3. Go to Data Protection
  4. Add replication task
  5. Source Tank-Rust/VirtualMachines/WindowsTEST-16eiki - Destination WesternDigitalBackup/WindowsTEST-eiki - Next
  6. When Run Once -Make Destination Dataset Read-only? NO - Save
  7. ERROR message "Unable to send encrypted dataset 'Tank-Rust/VirtualMachines/WindowsTEST-16eiki' to existing unencrypted or unrelated dataset 'WesternDigitalBackup/WindowsTest-16eiki'."
  8. P.S. If I go back to datasets the zvol that I created under WesternDigitalBackup is indeed encrypted, it is "Unlocked by ancestor".

Thanks
TheBearJew
 
Joined
Oct 22, 2019
Messages
3,641
You should let the first-run of the replication create the dataset/zvol on the destination side, rather than create it manually and try to overwrite it, essentially.
 

TheBearJew

Cadet
Joined
Nov 4, 2022
Messages
5
OMFG................................. Your right. If I just manually type in a name like "WesternDigitalBackup/NEWNAMETEST" as the destination, it creates it.

WinnieLinnie, you are awesome.

Now, why aren't all the zvols showing up in available disks when I go to create a new VM? It seems the ones I copied into the root of the pool can be seen, but not underneath a dataset?
 
Joined
Oct 22, 2019
Messages
3,641
Your right. If I just manually type in a name like "WesternDigitalBackup/NEWNAMETEST" as the destination, it creates it.
The GUI is not very intuitive, since it's not obvious you can do this. :confused:



Now, why aren't all the zvols showing up in available disks when I go to create a new VM? It seems the ones I copied into the root of the pool can be seen, but not underneath a dataset?
Do you mean on the backup pool or the main pool?

I tested this out on TrueNAS Core 13.0-U6.1. A zvol nested underneath a child dataset shows up as an available disk for a new VM. (I don't have a feasible/easy way to test this on a "backup", nor on SCALE for that matter.)




WinnieLinnie, you are awesome.
Hey, thanks. That was nice of you.
 
Last edited:
Top