ZFS RAID levels
When we evaluated ZFS for our storage needs, the immediate question became – what are these storage levels, and what do they do for us? ZFS uses odd (to someone familiar with hardware RAID) terminology like Vdevs, Zpools, RAIDZ, and so forth. These are simply Sun’s words for a form of RAID that is pretty familiar to most people that have used hardware RAID systems.
Striped Vdev’s (RAID0)
Striped Vdev’s is equivilent to RAID0. While ZFS does provide checksumming to prevent silent data corruption, there is no parity nor a mirror to rebuild your data from in the event of a physical disk failure. This configuration is not recommended due to the potential catastrophic loss of data that you would experience if you lost even a single drive from a striped array. How To Create Striped Vdev Zpool
Mirrored Vdev’s (RAID1)
This is akin to RAID1. If you mirror a pair of Vdev’s (each Vdev is usually a single hard drive) it is just like RAID1, except you get the added bonus of automatic checksumming. This prevents silent data corruption that is usually undetectable by most hardware RAID cards. Another bonus of mirrored Vdev’s in ZFS is that you can use multiple mirrors. If we wanted to mirror all 20 drives on our ZFS system, we could. We would waste an inordinate amount of space, but we could sustain 19 drive failures with no loss of data. How To Create Mirrored Vdev Zpool
Striped Mirrored Vdev’s (RAID10)
This is very similar to RAID10. You create a bunch of mirrored pairs, and then stripe data across those mirrors. Again, you get the added bonus of checksumming to prevent silent data corruption. This is the best performing RAID level for small random reads. How To Create Striped Mirrored Vdev Zpool
RAIDZ is very popular among many users because it gives you the best tradeoff of hardware failure protection vs useable storage. It is very similar to RAID5, but without the write-hole penalty that RAID5 encounters. The drawback is that when reading the checksum data, you are limited to basically the speed of one drive since the checksum data is spread across all drives in the zvol. This causes slowdowns when doing random reads of small chunks of data. It is very popular for storage archives where the data is written once and accessed infrequently. How To Create RAIDZ Zpool
RAIDZ2 is like RAID6. You get double parity to tolerate multiple disk failures. The performance is very similar to RAIDZ. How To Create RAIDZ2 Zpool
This is like RAIDZ and RAIDZ2, but with a third parity point. This allows you to tolerate 3 disk failures before losing data. Again, performance is very similar to RAIDZ and RAIDZ2.
Nested RAID levels – You can also add striped RAIDZ volumes to a storage pool. This would be akin to RAID50 or RAID60. This would increase performance over RAIDZ while reducing capacity of your physical storage. How to create Striped RAIDZ Zpool
We have decided to go with Mirrored Striped Vdev’s (RAID10). This gives us the best performance in a scenario where we do a lot of writing and a lot of small random reads. It also gives us great fault tolerance. In a best case scenario, we could lose 10 of 20 disks and have no data loss. Obviously we would replace drives immediately after a failure occurs to maintain optimum performance and reliability, but having that safety net of being able to lose that many drives is comforting at night while servers are humming away in the Datacenter.
13 Comments to ZFS RAID levels
Leave a Reply
You must be logged in to post a comment.