9

I'm looking into ZFS and using FreeNAS for ZFS management and have the following question:

Do the ZFS advantages as deduplication, auto error fixing etc still work when creating an iSCSI target on a ZFS volume?

In FreeNAS, this is probably a raw image file which in used as a target on a ZFS volume. Since it's block based (rather than file based): do ZFS the advantages still apply?

Edit: Intended use will be storage for VMware (ESXi).

Devator
  • 1,473
  • 4
  • 18
  • 37

3 Answers3

11

Yes, it all works... Dedupe, compression, checksumming, caching are all present when using zvols in ZFS. But I really prefer NFS for virtualization purposes because of the transparency. But either will do the job.

Can you elaborate a bit more on your intended use for ZFS? I ask because there are a lot of potential design/planning issues. Take a good read of this ZFS primer...


If you're using this to back a VMware installation, I strongly suggest using NFS. iSCSI won't buy you much with the setup you describe, and there's far more to go wrong from a networking and implementation perspective. Either way, ALL of the core ZFS features work whether you're using ZFS filesystems (NFS) or zvols (iSCSI).

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • The intended use will be for VMware ESXi. I will take a read on the link you have posted. Thanks! – Devator Oct 01 '14 at 13:47
  • 1
    If you are using FreeNAS with VMWare, use NFS. There are some space freeing bugs in the iSCSI implementations in the current stable FreeNAS releases. They are being fixed, but NFS works well out of th ebox – tegbains Oct 05 '14 at 08:17
  • 1
    We have been using ZFS NFS for a few years now supplying 48TB in various configurations (tier 1, 2 & 3). I agree that NFS is the best choice. Just be aware that ZFS gives comparatively low performance compared to other filesystems, even using SSD. It's designed to be very robust. Speed wasn't the top priority. – Ian Macintosh Oct 10 '14 at 09:48
  • 1
    @IanMacintosh Under with ZFS implementation? Linux? Solaris? Nexenta? *BSD? OmniOS? – ewwhite Oct 10 '14 at 09:49
  • [Linux native](http://zfsonlinux.org/) – Ian Macintosh Oct 10 '14 at 10:34
  • Note that FreeNAS 9.3 and up uses a completely different iSCSI implementation, which includes VMWare VAAI support. You might get a nice performance advantage over NFS this way. – Edward Tomasz Napierala Mar 31 '15 at 01:11
  • This comment needs to be updated to advise the user what they are getting into using NFS. NFS does NOT GUARANTEE WRITES. iSCSI does. If your data is important, NFS is a bad idea unless you want to turn on sync, in which case say goodbye to performance. – Routhinator Apr 23 '18 at 18:06
  • @Routhinator NFS for VMware is fine. This is also why we use SLOG devices for NFS exports to VMware. No need to fear monger here :) – ewwhite Apr 23 '18 at 21:00
3

Using ZFS + VMware + NFS is a terrible idea. It will get you the worst result. Vmware uses an implementation of NFS that need constantly to do SYNCed writes, and wait for each one to do so. And this is extremely slow on ZFS.. ZFS first writes in the ZIL log and a lot latter do the actual wirte on disks (and only then confirm the sync write). I got 5MB/s on secuencial writes with ZFS+VMware+NFS. Then I tested on UFS+iSCSI and I got results of 64MB/s on secuencial wirtes (raid 1). Didnt tested iSCSI on ZFS

Juan
  • 39
  • 1
2

The idea of sync writes is really a good idea for boot disks, which are key to virtualization. You want to wait for an acknowledgement. Speed is not an issue at boot, durability should be. When you need performance, go to something speedier. Performance and reliability are always a tradeoff.

On of my pet peeves is when people want really speedy VM performance when they have VMs running things like network services that might do 100 writes a day.

FreeNAS 9.3 has the necessary unmapping required for iSCSI use with VMware.

GregL
  • 9,370
  • 2
  • 25
  • 36