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).
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).
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
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.