# RAID5 (UFS2) + GELI vs RAID-Z (ZFS)



## Penel (Nov 18, 2009)

I will be setting up a new server with a minimum of 4 hard drives in RAID 5 mode and will be encrypting all the drives with geli.

I was wondering if their would be a significant performance increase going with RAID-Z (software based) as opposed to RAID5 (hardware based).

I am mainly concern with data integrity because I am not using ECC memory, however I do have a large UPS backup to ensure my server doesn't go down.


----------



## phoenix (Nov 18, 2009)

If you want data integrity, go with ZFS.  That way, you get end-to-end data integrity (checksums computed and stored with the file, checksums checked on reads, etc) and self-healing (if a checksum doesn't match, or the file is unreadable, ZFS either pulls it from a different disk, or rebuilds it from parity info).  These are things hardware RAID controllers cannot do.

Plus, you also get built-in support for single-parity (RAID5) or double-parity (RAID6), compression settable on a per-filesystem basis, snapshots, and a whole bunch more.  De-duplication support was just added to ZFS on Solaris, so expect it to hit FreeBSD next year.

Eventually, encryption will be built-in, as well.

Performance-wise, it should be similar or slightly slower.  But it shouldn't be noticeable.

If you search the forums, you'll find several people that are using ZFS+GELI successfully.


----------



## graudeejs (Nov 18, 2009)

ZFS+GELI rocks. I use it 
0 problems


----------



## Penel (Nov 19, 2009)

Thanks guys. You both have some very valid points. After I had posted this thread, I found some similar threads here on the FreeBSD forum regarding this matter.

I have decided that I am going to go with RAID-Z + GELI versus RAID-5 + GELI. 

Even if there is a slight chance of a performance decrease, honestly I probably wouldn't even notice. Data integrity is my number one priority.


----------

