Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
Thanks, this makes sense. I couldn't figure out how to accomplish it in KVM, but it looks like this is possible with some edits to the apparmor settings in /etc/apparmor.d/abstractions/libvirt-qemu. Will leave the OS in a QCow image on LVM and keep data files in a zfs volume comprised of the SATA disks available via passthrough/direct access to the VM. –  nedm Nov 16 '09 at 23:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.