I got couple servers not long time ago with pre-installed hardware RAID5. I plan to use those servers as a dedicated NAS (with some VMs) on my LAN.
Currently I see these options:
- disconnect HDDs from RAID controller and let ZFS do the job
or
- leave controller alone and just use UFS.
What should I do in this situation and what are the best options? Plus I never used ZFS and really keen to try it out ^^.
As a base system I'm using XEN with NetBSD as DOM0.
Why not run benchmarks on your particular server hardware and figure out what is best for your combination of hardware and file usage?
One tip: RAID5 will take forever to rebuild an array on modern size hard disks (2TB or higher), and during that time the performance of the RAID array will be compromised.
Modern setups use stripes of mirrored hard disks: this combines scalability/expandability with rebuild performance. Less 'efficient' than RAID5/6, but hard disks are REALLY cheap these days*.
You didn't mention if the hardware raid controller has a battery backup module on it or not. If so, the controller will be able to commit writes as soon as they're in RAM on the controller... if not, it will have to wait until they are actually committed to disk. Depending on your workload, this can make a major difference in performance of the raid controller.
Personally, unless you have a reason to pull the raid controller, I'd leave it in but map each physical drive through as an independent drive (i.e., set up one "raid group" per drive, each with one drive in it), then use ZFS on top of that. This would let you take advantage of any battery backed RAM on the raid controller, but still let you use ZFS and get all of it's advantages.
ZFS can be raid-z{1,2,3}, stripe, mirror, and even RAID-10. Meanwhile RAID-5 is always just RAID-5. Hence you're comparing juice to apple.
RAID-5 is efficient capacity user, but very laggy data writer. RAID-10 is often preferable instead.
Keep in mind that if you're dealing with big throughputs, you might be CPU-constrained with a software solution.
By saying you want to use "ZFS" i assume you want to use a software solution using ZFS as the filesystem of choice for the raid volume (with all the perks that it brings to the table).
If you are CPU-constrained, leave the raid management to the dedicated controller. At some point, that card has been bought and you might still be in the "return of investment" time window.
That means you should leave it alone and not add work hours to fix something that still works.
If you're not CPU-constrained, your infrastructure is scaling up and the current solution is dragging down the performance of the whole system (and, therefore, productivity), then you can consider a software striped/mirrored setup as someone else suggested.