Replicate Zvol between 2 FreeNAS boxes

Status
Not open for further replies.

gzartman

Contributor
Joined
Nov 1, 2013
Messages
105
I'm trying to use the replication function in FreeNAS to replicate 2 zvols to a second freenas box.

I have the snapshoting and SSH working properly, but the replication says it can't open the "dataset" I'm trying to replicate. Do I need to create the exact zvol on the PULL side for this to work?

I see the following error message one the PUSH box: CRITICAL: Oct. 15, 2016, 7:46 p.m. - Replication Main/Backups/VMs -> 172.23.0.3:Main failed: Failed: cannot open 'Main/Backups/VMs/Backups/VMs': dataset does not exist.

172.23.0.3 is my PULL box.

The ZVOL I'm trying to replicate is "Main/Backups/VMs"

In the replication task, for Remote ZFS Volume/Dataset, I put: Main/Backups/VMs



Thanks
 
Last edited:

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Can you please post full system specs and software version per forums rules

With limited information on your volume and dataset structure, I'm grabbing at straws here but:
- Are you trying to replicate the same 2 zvols to the same location (dataset) on PULL?

I have found replication behaves better if you create a nested dataset on the PULL Machine specifically for the volume on PUSH. I originally had my PUSH replicating to the top level of PULL and it was throwing errors but completing successfully.
 

gzartman

Contributor
Joined
Nov 1, 2013
Messages
105
Can you please post full system specs and software version per forums rules

With limited information on your volume and dataset structure, I'm grabbing at straws here but:
- Are you trying to replicate the same 2 zvols to the same location (dataset) on PULL?

I want to replicate a zvol from one box to another so I essentially have a backup.

Freenas1: /Main/Backups/VMs ----Replicate---> Freenas2: ?????

I don't know what to input for the "Remote ZFS Volume/Dataset:" in the replicate task setup. I can do what ever needs to be done on FreeNAS2 as the sole purpose of this box is backups of FreeNAS1.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
don't know what to input for the "Remote ZFS Volume/Dataset:" in the replicate task setup.
This parameter is to specify to the system where you want the replicated data to be placed.

So if your setup on PULL is as follows:
mnt/tank/backup with backup being a dataset you created for the specific purpose of storing the replicated data, then you oddly enter:
tank/backup
 

gzartman

Contributor
Joined
Nov 1, 2013
Messages
105
This parameter is to specify to the system where you want the replicated data to be placed.

So if your setup on PULL is as follows:
mnt/tank/backup with backup being a dataset you created for the specific purpose of storing the replicated data, then you oddly enter:
tank/backup

I think this makes sense. In my case, I think I would put "Main/Backups" for the PULL side. I have a zpool named "Main" and the primary zfs dataset named "Main" I then created a sub-dataset called "Backups" (e.g. /mnt/Main/Backups).

I set it to run tonight so we'll see what happens. It's a pity the log reporting seems so minimal for this function.
 

gzartman

Contributor
Joined
Nov 1, 2013
Messages
105
I got it working. Thanks for the help @nojohny101. I ended up inputting the top level dataset and then Freenas added the other sub-datasets down to where my zvol lived, that it needed on the other end (i.e., in input Main). Once again, Main is my primary zfs dataset. At first it didn't work, but then I deleted the replication task and recreated it, then it started right up.
 
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I use tank/replicas/<servername> as the backup target for a given server on my backup system
 

pvuchetich

Dabbler
Joined
Aug 23, 2012
Messages
17
I have a related question for backing up/recovering a zvol that wasn't clear to me in the OP:

When setting up the target server for backing up to an offsite FreeNAS server, must the target ALSO be a zvol, should it be a regular dataset, and/or does it depend?

Initial ZFS replication configuration:
localtank/myVM (zvol) --> snapshot + zfs replication task --> remotetank/myVM (zvol)

I could see a couple of failure/recovery models to test, depending on the purpose of the VM and the nature of the primary server failure:
1. To spin up the zvol as a VM on the remote server, it would need to be a zvol, and referenced by a duplicate VM configuration on that server.
2. To copy the data back to the primary server, it might not matter (does it?) whether it is a zvol or regular child data set, as long as it replicated (zfs send/receive) to a zvol before assigning it to a VM.

Thanks!
 
Status
Not open for further replies.
Top