ZFS Virtual Machine and ZFS file system

Hello !

I'm a college student and don't know much about computers
But I'm trying to make a Wiki with my friends upon support from school.

I heard that ZFS file system is strong against silent data corruption
So I got interest in FreeBSD.

My question is,
I think we'll gonna use Xen virtualization.

Can I use FreeBSD with ZFS file system virtualized on Xen ?
Are there any performance / technical problems ?
 
Hardware would be like this
Sorry I don't know how to call this

There would be 12 * 4TB HDD

Make 3 * ( Raid of ( 2 * 4TB HDD ) )
And those 3 * ( 8TB ) will be mirrored
 
Why Xen? Have you verified that FreeBSD even runs as a Xen client? It would also be a good idea to study ZFS RAID arrangements. It has some that are unique and following standard RAID arrangements can be a disadvantage.
 
I'm a college student and don't know much about computers

What exactly do you mean by this? Because, if I may be blunt, data that is stored on a ZFS pool administered by someone who does not understand how ZFS works---or what its limitations are---is probably in greater danger than data that is stored on any traditional filesystem. There is nothing magical about ZFS, and virtually all of the World Wide Web runs on servers that do not use ZFS. If you do not understand how to use it or what its potential problems are, ZFS will probably just make your system more difficult to manage with little or no benefit

Just as a simple example: while you can certainly use ZFS inside a virtual machine, ZFS really should be run on bare metal. Using it in a virtualized environment would potentially interfere with ZFS doing some of its automated tasks, and force some resource limitations on it. More importantly, if your virtual disks are running on top of a legacy filesystem then the primary advantage of using ZFS, and the one that interests you---automatic repair of damaged data---is pretty much useless. The ZFS pool is inside the virtual disk, and can repair damage to data stored on that pool inside that virtual disk, but if the virtual disk itself (which is stored on the host system's traditional filesystem) is damaged, then there is nothing that could be done about it.

If the previous paragraph was confusing, you should really just stick to a traditional filesystem and make multiple routine backups. It would be simpler, and like I said, most Web servers are managed that way anyway, and the most common filesystems (HFS+, NTFS, Ext4, UFS2) are rock solid these days.
 
What exactly do you mean by this? Because, if I may be blunt, data that is stored on a ZFS pool administered by someone who does not understand how ZFS works---or what its limitations are---is probably in greater danger than data that is stored on any traditional filesystem. There is nothing magical about ZFS, and virtually all of the World Wide Web runs on servers that do not use ZFS. If you do not understand how to use it or what its potential problems are, ZFS will probably just make your system more difficult to manage with little or no benefit

Just as a simple example: while you can certainly use ZFS inside a virtual machine, ZFS really should be run on bare metal. Using it in a virtualized environment would potentially interfere with ZFS doing some of its automated tasks, and force some resource limitations on it. More importantly, if your virtual disks are running on top of a legacy filesystem then the primary advantage of using ZFS, and the one that interests you---automatic repair of damaged data---is pretty much useless. The ZFS pool is inside the virtual disk, and can repair damage to data stored on that pool inside that virtual disk, but if the virtual disk itself (which is stored on the host system's traditional filesystem) is damaged, then there is nothing that could be done about it.

If the previous paragraph was confusing, you should really just stick to a traditional filesystem and make multiple routine backups. It would be simpler, and like I said, most Web servers are managed that way anyway, and the most common filesystems (HFS+, NTFS, Ext4, UFS2) are rock solid these days.

Lol that meant I'm not in computer science field. Though I have some Linux experience due to computational physics things but I don't have in depth knowledge about computers related with OS, File systems, hardware...

So with empty server hardware, if I install Xen with ZFS on it and running guests with legacy file systems would still benefit from ---automatic repair of damaged data--
Am I getting it right?

Thanks for your reply I'd better study about ZFS file system
 
So with empty server hardware, if I install Xen with ZFS on it and running guests with legacy file systems would still benefit from ---automatic repair of damaged data--
Am I getting it right?

Not quite. Suppose the host system is FreeBSD with ZFS. The virtual disk image on that host is a single file. If that single file is damaged, and redundancy is in place, then yes, ZFS will restore that virtual disk file. But if the virtual disk is formatted with a traditional filesystem, any corruption that occurs to the data on written inside the virtual disk (corruption that occurs within the running virtual machine) will be unknown to ZFS on the host. The only way for this to really work as intended would be to use ZFS in both the host system and the virtualized guest system.

But that would be a waste. There's one obvious question hanging in the air: why use a virtual machine at all? Forgive me for jumping to a conclusion, but if the machine you described will be running Windows Server, you can't use ZFS. Or rather, you can run ZFS in a virtual machine on top of Windows Server, but there would be many fewer benefits (silent corruption of one thing or another could still occur) and you will probably get noticeably poorer performance. If it is a Linux server you could use ZFS on Linux, and it would work much better. Linux support for ZFS seems to be progressing alright. But running FreeBSD in a virtual machine with ZFS would not protect your data nearly as much as using ZFS on an actual disk.
 
Note that ZFS' "self-healing" protection only works for RAID setups (mirror, RAIDZ, RAIDZ2, etc) or if you set copies to 2 or higher. It cannot heal a single disk setup. There needs to be some sort of redundancy of the data.
http://arstechnica.com/information-...nd-atomic-cows-inside-next-gen-filesystems/2/

But besides that, FreeBSD should run fine as a Xen guest (I've tested it on Xenserver 5.5, 6.2 and 6.5). ZFS in and of itself will run just fine too. I haven't tested actual performance differences between UFS and ZFS on top of Xen but judging by the intended usage and some real world experience using MySQL on both ZFS and UFS on bare metal I very much doubt you will notice any performance advantage or disadvantage.

As for running on Xen, I try not to assign more than 4 cores to a guest. Any more is likely to cause scheduling issues on the host side which can result in decreasing performance of the guest instead of increasing it. If your server can't handle the load it's better to spread it to multiple hosts with a load-balancer. This will make updates easier too because you can offline a server without interfering the service you are providing. If you go with ZFS give the guest plenty of RAM. ZFS likes RAM. A lot. The added benefit of this is that most of your files will come from RAM instead of a (virtualized) disk. That said, even UFS likes RAM and will provide the similar performance benefits. And that's not even mentioning the caching properties of Apache, nginx or whatever web server you plan on using.
 
Back
Top