Friday, January 11, 2013

Making Gumbo with Hyper-V, ZFS, Ubuntu, and Windows



Use case: HTPC/fileserver
ZFS (kernel mode) inside Ubuntu 12.04 VM on Hyper-V on Windows 8 connected to physical drives

Advantages:
·         samba server software on Ubuntu: $0
·         Ubuntu 12.04 cost: $0
·         ZFS (www.zfsonlinux.org) cost: $0
·         No raid card required (if all drives can connect to motherboard via SATA/eSATA/USB) $0
·         Keep your HTPC media files safe and secure with ZFS snapshots, checksums (scrub), rsync backups, etc. “previous versions” from windows explorer still works with a network drive as long as you have snapshots in ZFS.
·         Play media files through windows mapped network drive (samba) from Ubuntu VM
without any additional network traffic on your home network
·         Share media files through FTP/samba with your mobile/handheld devices over wifi in your house
·         Rest easier with ZFS raidz/mirror filesystems behind your media files.
·         xrdp in Ubuntu 12.04 is very functional and lets you have a Windows and Ubuntu desktop running simultaneously (especially true if you have 2+ monitors)
·         lower energy costs by combining fileserver, gaming pc, media player in one box
·         You can use USB drives as mirrored/raidz backups that are portable to any server running ZFS (USB 2.0 has slow read/write but it works)

Disadvantages:
·         Complexity of setting up and installing everything increased – average home user cannot handle setting up Hyper-V, VM’s, Ubuntu, or ZFS command line administration.
·         No commercial application for this, due to nightmare of supporting so many moving parts and licensing issues

Use case:
ZFS (kernel mode) inside Ubuntu 12.04 VM on Hyper-V Server 2008 R2/2012 connected to physical drives/RAID logical volumes

Advantages:
·         iscsitarget iSCSI server software on Ubuntu: $0
In our limited real world testing, iscsitarget on Ubuntu beats Windows iSCSI target and Starwind in terms of performance
·         nfs-kernel-server software on Ubuntu: $0
·         samba server software on Ubuntu: $0
·         Ubuntu 12.04 cost: $0
·         ZFS (www.zfsonlinux.org) cost: $0
·         Hyper-V Server (2008 R2 or 2012) cost : $0*
·         Replicating all your VHD’s, VHDX’s, and VMDK’s (if you are using the nfs server to host ESXi files) or entire iSCSI targets can be done with ZFS snapshots/send/receive for $0 at crash consistent states. Incremental block level changes to filesystem replication = much less network and disk overhead. Obviously not a replacement for Veeam (or similar product) but it’s free and not very complicated to set up.
·         Consolidate your hypervisor and fileserver on a single computer to reduce costs/network traffic and free up bandwidth for user connection to VMs. No need to buy expensive 10gb Ethernet connections, fiber channel SAN connections, or teaming aware switches.
·         Windows drivers are used to control hardware, which means increased compatibility over native Ubuntu or (even worse) Solaris and gives you more options when it comes to hardware RAID controllers (including those awful HP ones they love to put in low end server hardware) and tape libraries.
·         Most VM’s are fairly compressible. ZFS allows your iSCSI target to be hosted on a compressed ZFS filesystem (lzjb, gzip) without windows knowing about it. This allows you to “over commit” your NTFS iSCSI targets to some degree vs physical ZFS storage space. This is especially true for VMs with large SQL Server, Sybase, or Oracle databases. LZJB compression in ZFS performs very well (it runs circles around Windows folder compression).
·         Hyper-V Server (either version) is easier to get installed on whiteboxes / non-server hardware you may have leftover or extra lying around that you want to turn into a test environment
·         ZFS will allow you to turn a couple fast SSD’s into a ZIL log device and ARC2 cache device and reduce the amount of “file i/o” cache RAM required for decent performance.
·         The ability to create copies of entire filesystems as clones (ZFS snapshot -> ZFS clone) makes it really easy to create a test copy of any VM(s) without requiring much additional disk space for testing updates/upgrades/patches or creating a testing/qa environment
·         Easy to make a backup of your fileserver’s boot/root drive since it’s a VHD file.


Disadvantages:

·         Speed is slower than a dedicated hypervisor and a dedicated fileserver over fast (10gb/fiber) connection
·         Clustering in Hyper-V is designed around a SAN solution physically separate from your hypervisors (iSCSI or fiber connected)
·         Large scale production environments would be much better off with an enterprise SAN with commercial support (Solaris/Oracle, EMC, HP, etc) but that is (usually) a prohibitively expensive investment for small to medium size businesses in a down economy
·         * Hyper-V Server does not have a GUI and is a pain in the buttocks to manage. If you’re going to spend money on anything, Windows Server Datacenter edition would be my choice here. (about $4k to $5k per socket) The benefit of datacenter also being unlimited windows server VM’s (license covered via datacenter licenses of hypervisor). Also Hyper-V Server does not (as far as I can tell) allow you to set up network teaming like Server 2012 does.

No comments:

Post a Comment