Check Replication works

Status
Not open for further replies.

Opentrends

Dabbler
Joined
Feb 17, 2016
Messages
11
Hi all,

I have 2 freenas servers (Server1). The first one has 1 Zvol shared via iscsi to a esxi server. This zvol is replicated to the second server (Server2) via snapshots and replication tasks.
It seems that the replication is working as expected, because the zvol in the replicated freenas is growing.
But I want to ensure that the replication works ok, and I'd like to mount this replicated zvol in (server2) vis iscsi to a esxi server in order to check if the files in the zvol are ok.

My question is:

Is a good decision to mount a zvol from a replica server via ISCSI to a esxi server as a datastore, configuring extent as read-only.? I don't need to modify data inside this zvol, just list files or even copy some data to others datastores.
I fear that replication can be corrupted if the data on the replica zvol are updated for some reason
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
You could clone a snapshot.

I'm not 100% sure how the replication is handled in FreeNAS, but with normal ZFS replication, the receiver will rollback to the last common snapshot.
 

Opentrends

Dabbler
Joined
Feb 17, 2016
Messages
11
You could clone a snapshot.

I'm not 100% sure how the replication is handled in FreeNAS, but with normal ZFS replication, the receiver will rollback to the last common snapshot.

Hi Stux,
Thanks for your answer. I know the clone option, but I think that I have no space available on the replicated zvol to clone the snapshot. (I guess that clone is going to consume the size of the whole zvol).
This is why I want to work directly on the zvol, but accessing read-only to don't corrupt the replication.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
My understanding is that a clone will not use any extra space until the clone diverges.
 

Opentrends

Dabbler
Joined
Feb 17, 2016
Messages
11
Thanks Stux,
So If I understood right, I can clone a snapshot, then a new zvol will be created (clone) with no extra space consumed.
I can present this new zvol to my esxi server, copy some files. The space generated by this zvol will be only due to some modification in certain files.
And then I can freely remove the clone.

Is this a good procedure? In this way replication will run its course?
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Thanks Stux,
So If I understood right, I can clone a snapshot, then a new zvol will be created (clone) with no extra space consumed.
I can present this new zvol to my esxi server, copy some files. The space generated by this zvol will be only due to some modification in certain files.
And then I can freely remove the clone.

Is this a good procedure? In this way replication will run its course?

Yes.

...

So I just did this...

In the storage tab->Volumes, select the zvol. Click the Create Snapshot button at the bottom.

Now, go to Snapshots tab.

Find the snapshot you just took. You may want to filter by name etc.

Click the snapshot... now click the Clone Snapshot button on the right. Give it a name/location etc.

You now have a clone of a zvol. My trivial test used 17KB for a clone of a 200GB zvol.

You should be able to setup an iSCSI share for that zvol as if it were any other zvol etc. You will not be to destroy the snapshot used via the GUI while the clone exists.

You can promote the clone to an independant clone using the CLI, thus allowing the original snapshot to be destroyed.

For all intents, a "clone" is a writable copy of a given snapshot.

...

They're pretty cool :)
 
Last edited:

Opentrends

Dabbler
Joined
Feb 17, 2016
Messages
11
I don't find the option to promote the clone to an independant clone Stux.
It is normal that the zvol_clone presented to the esxi via iscsi (extent selected is clone_zvol) is showed by this esxi as the original volume name?
Ex.
Original Volume Name (NAS)
Clone Volume Name (NAS-clone-auto-****)
And when I present NAS-clone-auto*** to esxi, esxi detects it as NAS. Do you think it's normal?
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I don't find the option to promote the clone to an independant clone Stux.
It is normal that the zvol_clone presented to the esxi via iscsi (extent selected is clone_zvol) is showed by this esxi as the original volume name?
Ex.
Original Volume Name (NAS)
Clone Volume Name (NAS-clone-auto-****)
And when I present NAS-clone-auto*** to esxi, esxi detects it as NAS. Do you think it's normal?

Sure, its a clone. I expect the volume name is stored inside the zvol's data by ESXi, and you would need to change the volume name, if you wanted to change the volume name.

regarding promoting the clone. I'm referring to divorcing the clone from its parent snapshot, so that you can erase the snapshot. You don't need to do this if you intend to remove the clone before you remove the snapshot, but if you did want to do this, it can't be done in the GUI, but it can in the command line.

http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6r4n/index.html
 
Status
Not open for further replies.
Top