We've got some large SATA disks kicking around, and I've been toying with the idea of throwing them in a KVM host and installing a FreeNAS VM to manage them. I'd be adding these via LVM to the host, and given the total size of the disks (~5TB) I'll probably need to use LVM volumes directly instead of disk images for vm disk.

My question is this: Will I be negating the benefits of using ZFS on FreeNAS by installing it on top of LVM this way? I'm trying to wrap my head around how redundancy and error-correction might be translated from the hardware through to ZFS in this kind of setup.


Why not just cut LVM out of the picture and let ZFS do its magic on its own?

If you create an LVM, the ZFS error-correction will probably work okay, but you'll almost certainly lose your redundancy, because ZFS needs to see a separate device for each disk in order to guarantee hardware disk redundancy. If you tie all the disks together into a large LVM, the ZFS pool will only see one large drive, so it won't know that there are multiple physical disks that could be providing redundancy. If a disk containing data in your LVM dies, you probably won't be able to recover that data.

Instead of using an LVM or creating disk images that fill the devices, you should still be able to map the physical drives over to the FreeNAS VM and allow ZFS access to the raw devices. VMware allows you to create a SCSI passthrough device--which, of course, includes disks. (Some versions of VMware and other hypervisors also allow you to give VMs raw access to disks without requiring a special passthrough device.)