Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

ZFS Delta Export-Import-Merge Question

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
Status
Not open for further replies.

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
Problem:

I have two virtual environments (one public and one private). The two are disjointed.

My public virtual machines:

VM1, Windows 7
VM2, Windows 8
VM3, Windows 10
VM4, Red Hat
...

VM100, Windows 10

receive regular updates via the Internet.

My private virtual machines are the same as the public virtual machines, the only difference is that the public virtual machines are up to date.

Presently, if we want to update the private virtual machines, we need to export the public virtual machines, hand-carry them to the private network, delete the older private virtual machines and replace them with the newer public machines.

Question:

Can I use ZFS to speed up the process by performing a backup and restore on the block level, only restoring blocks that have been changed or been added?

Is the following possible:

1. Deploy two FreeNAS servers (one on the public network and one on the private network).

2. Create iSCSI volumes on both Free NAS Servers.

3. Mount the iSCSI volumes as ESXi VMFS datastores.

4. In the public virtual infrastructure, perform a one-time full block-level backup (is that a snapshot?).

5. Export the full backup to a external disk, carry it to the private virtual infrastructure and perform a restore.

6. In the public virtual infrastructure, perform an backup of blocks that have changed only.

7. Export the and restore the significantly smaller backup.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
Yes it is, but things don't work exactly as you described. For simplicity, I'm just focussing on the data (steps 4-7) (it doesn't really matter what the data is).

You should do some reading about zfs replication and snapshots. Replication sync's the status of one or all snapshots between 2 datasets. In your case, you are actually going to have 3 (one on each freenas, and one on the sneaker-net disk). Create a snapshot schedule (or just do one manually), replicate from your public to the disk, detach the disk, import to the private, replicate from the disk to private.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
I should point out that there isn't any way to merge at the destination. Meaning once you finish replicating, you will see whateveer snapshot was in public. So if any data was saved in a vm on private, it will be gone. You can also create a clone of a snapshot which allows you to edit data in a non-disruptive way (it's like creating a copy of data without actually copying data).
 

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
Yes it is, but things don't work exactly as you described. For simplicity, I'm just focussing on the data (steps 4-7) (it doesn't really matter what the data is).

You should do some reading about zfs replication and snapshots. Replication sync's the status of one or all snapshots between 2 datasets. In your case, you are actually going to have 3 (one on each freenas, and one on the sneaker-net disk). Create a snapshot schedule (or just do one manually), replicate from your public to the disk, detach the disk, import to the private, replicate from the disk to private.

You are absolutely correct. I need to do some reading on ZFS in general. Before yesterday, I had not heard of it.

The moderator on FreeBSD gave me a link to read and mentioned that snapshots can be streamed to a file.

At this point, I am not sure if I should go the FreeNAS route or the FreeBSD route.

Thanks for your input.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
I'd suggest starting with freenas, and google zfs snapshots. There are a lot of good resources out there. Basically freenas puts a user friendly interface on the innerworkings which I think helps accelerate the learning curve.

Yes you can stream to a file, but in your case it's probably not going to make a difference (the file is nice if you want to store it in a different filesystem).
 

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
I'd suggest starting with freenas, and google zfs snapshots. There are a lot of good resources out there. Basically freenas puts a user friendly interface on the innerworkings which I think helps accelerate the learning curve.

Yes you can stream to a file, but in your case it's probably not going to make a difference (the file is nice if you want to store it in a different filesystem).

Yeah, the FreeNAS route is a good idea.

Presently, my virtual environment uses NFS shares as datastores. Can I put NFS on top of ZFS? I was under the impression that I had to use iSCSI with ZFS.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
Presently, my virtual environment uses NFS shares as datastores. Can I put NFS on top of ZFS? I was under the impression that I had to use iSCSI with ZFS.
Yes, NFS is supported. Any idea where you got that idea?
 

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
Yes, NFS is supported. Any idea where you got that idea?

I was reading a thread where a member stated that his NFS vSphere datastore performance was horrible. Another member suggested that he use iSCSI instead.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
Both work, but if there is a performance issue, then the root cause is usually the HW configuration. iSCSI had some performance improvements added a couple months ago, which is why you might see that. Also, NFS uses sync writes by default which needs a fast, and power protected flash drive SLOG device. ISCSI by default doesn't require sync writes, so performance isn't an issue (but data integrity is at risk). Also, consider that with iSCSI you likely won't be able to use as much of your storage space without performance taking a hit. jgreco has a couple great posts on both of these issues.
 

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
Both work, but if there is a performance issue, then the root cause is usually the HW configuration. iSCSI had some performance improvements added a couple months ago, which is why you might see that. Also, NFS uses sync writes by default which needs a fast, and power protected flash drive SLOG device. ISCSI by default doesn't require sync writes, so performance isn't an issue (but data integrity is at risk). Also, consider that with iSCSI you likely won't be able to use as much of your storage space without performance taking a hit. jgreco has a couple great posts on both of these issues.

Thanks for the info.

When I deploy this solution, I wonder if deploying a FreeNAS system with SSD drives, and a proper HW configuration, will mitigate the NFS performance issue.

I am looking at the FreeNAS mini appliance. Can you insert a 10 GB/s fibre NIC into the device?

After reading FreeBSD's information on ZFS and replication, I have started testing FreeNAS on a VMware VM. I will keep you apprised on my progress.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
An all SSD pool will certainly help. :smile:

I believe the freenas mini supports 10G, but I'm not sure if it will be able to saturate the link with only 4 drives.

Also look into sync-writes, ZIL, SLOG. That's where most of the performance issue differences between nfs and iscsi come into play.
 

jgreco

Resident Grinch
Moderator
Joined
May 29, 2011
Messages
15,026
No, an all-SSD datastore won't help much. A SLOG device will. See my "insights into SLOG" post for a fuller explanation.

The other thing is that if you don't need sync writes (to maintain VM integrity if the filer crashes etc) then by all means turn them off and it'll fly.
 

jgreco

Resident Grinch
Moderator
Joined
May 29, 2011
Messages
15,026
Yeah, sorry if I'm not wordy when typing away on a cell phone. ;-)
 

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
As I continue to explore FreeNAS, a question came to mind.

Is there any inherent deduplication associated with ZFS? I ask, because I created vSphere NFS datastore, and provisioned three virtual machines (each with a 100 MB thick-provisioned virtual disk). However, when I run the zfs list command, it shows that 61 MB have been used, when I was expecting to see 300 MBs have been used.
 

rsquared

Member
Joined
Nov 17, 2015
Messages
81
Deduplication is off by default (and should stay that way except in rare circumstances), but compression defaults to on. Even with thick provisioning, from the ZFS perspective you've just got 3 100 MB files filled with all 0s (assuming they're still empty) which are extremely compressible.
 

jgreco

Resident Grinch
Moderator
Joined
May 29, 2011
Messages
15,026
Some level of compression is enabled by default. I *want* to say it's zle but it could be lz4. Type "zfs get compression" to see. Both do a great job at compressing data fast; zle merely compresses runs of zeroes, while lz4 is optimized towards compressing large ZFS blocks very quickly (please do read the link, you almost certainly want at least one of these). Even though ZFS may have reserved the space for your entire 100MB files, the actual pool data written is less due to compression, which is mostly an all-around win because ZFS works better when it has more free space.

Also upon rereading, my response to @depasseg may have sounded rude but was actually merely terse because I was on the cell phone.
 

rass

Neophyte
Joined
Dec 22, 2015
Messages
11
I didn't interpret the response as rudeness. Thank for the information.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,867
Easy there Grinchy! You have a reputation to uphold. ;-)
 

jgreco

Resident Grinch
Moderator
Joined
May 29, 2011
Messages
15,026
Trust me, I'll make it obvious when I want to be rude.
 
Status
Not open for further replies.
Top