Cloning a replicated dataset

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi there,

I have two FreeNAS (both 11-2u1), first (Dell T130 - 16G ECC) is running the production and second (Dell T-110 ; 8G ECC) is for DR. Production is replicated to DR by ZFS replication tasks. Replication works as expected.

The fact that it works as expected includes that the replicated datasets on the DR NAS are read-only and do not even show when using "ls -alF" in the shell. When using "zfs mount" I see the "root" dataset that contains all the replicated ones, but not any of the "lower" replicated datasets. All datasets and snapshots are listed in the WebUI.

I understand why replicated datasets must be and stay read-only because they can be modified by ZFS replication anytime. Despite that, I thought that it should be possible for me to clone one of these replicated datasets and then to use the clone as I wish. Should the replicated snapshot used as a source be modified or deleted, the clone should survive as is. Unfortunately, it does not work like that.

Is there a way for me to clone a replicated dataset in the target system without breaking the entire replication ? Should that requires to actually re-copy all the data locally, I do have enough space for that despite it would be a waste of resources and would surely takes a long time.

The end goal is to use the DR instance for doing small scale data recovery instead of only complete failovers. Required services are run from the DR Docker Host and all they need is temporary access to the data.

As of now, when I try to clone one of these replicated datasets, FreeNAS complains that it can not mount them. Clones are created successfully but not mounted.

Any idea how should I proceed for that ?

Thanks for your help,
 
D

dlavigne

Guest
What is the exact error you receive when you try to clone a dataset? A screenshot might also be useful.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Good Morning DLavigne,

Thanks for your reply. Here is a PDF document with the screenshot about the situation :

PDF with screenshots illustrating the situation

The exact error message says:
Cannot mount ‘/mnt/Cloud-DR/DRStore/HAStore/NC-clone’: failed to create mountpoint clone successfully created but not mounted

If I hit Save again, the second error message says that the clone can not be created because the dataset already exists.

Indeed, the dataset is listed in the WebUI, but not in the CLI nor zfs mount.

Any idea ?

Merci pour le support,

--EDIT: The link expired so I removed it...
 
Last edited:

JustinOtherBobo

Dabbler
Joined
Aug 21, 2018
Messages
26
Try moving the clone totally outside the replication mount mess.

I created a separate drpool/restore dataset and use it to mount any replication clones I am trying to access
 
Last edited:

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Millions thanks for the answer. I thought that the clone had to be mounted somewhere below the root point of its original. That's why I did not tried to restore it to a new dataset below DRStore.

I create a Restore dataset below DRStore and used it as a target for the clone. The clone was created and mounted successfully and everything expected is in!

That will be a great plus for my recovery process.
 

JustinOtherBobo

Dabbler
Joined
Aug 21, 2018
Messages
26
Try moving the clone totally outside the replication mount mess.
I created a separate drpool/restore dataset and use it to mount any replication clones I am trying to access

A few months later I am running 11.1-U6.3, which is an update or two down the FreeNAS-11-STABLE train as compared to when I wrote the above.

Back then accepting the default Clone Name (and mountpoint) proposed by the Clone Snapshot dialogue didn't seem to work for me, or for Heracles who posted the original question.

As of now, accepting the default seems to work fine for me, whereas mounting a clone in /mnt/poolname/restore/clonename as I suggested above does NOT work on any of the six machines I tried it on, regardless of whether they are the sender or the receiver of the replicated dataset.
 
Top