Linux-KVM: file server as guest or host?

KVM and possibly the other solutions, allow you to present an entire block device to the guest OS. You could, for example, set up a dedicated LVM partition (or even complete disk drive) on the host system for your file server files, and present that to your file-server virtual machine as a hard drive mounted at /srv, for example.

That way you haven't got one huge file for your server - just a partition on the host's disks. That would take care of the files residing on the host but being served by the virtual file server to your network.

I've got a very similar setup, also on Ubuntu 9.10 with KVM, where I've got an LDAP directory and 6 virtual servers running atop 2 physical servers. I was torn with the same situation as yourself - do I set up 2 virtual machines to host the LDAP, or run it on the physical machines? My answer was because the physical machines also need access to LDAP, I'll host it on the physical boxes. If I'd done it the other way around, and the virtual LDAP server failed, the physical servers wouldn't be able to use it. But if the physical server fails, the virtual machines will have failed also so it doesn't matter that LDAP isn't working!

In my setup, the whole virtual machines are on LVM partitions at the host level, because they're replicated between the 2 physical machines using DRBD, so if one physical box dies, they can be bought up quickly on the other. The complete LVM partition is presented to the VM as a SCSI hard drive, and the VM then partitions that "hard drive" also using LVM.