ZFS on top of Hardware Mirroring, or just mirror in ZFS?

Don't know about the speed, but here is what I believe running ZFS on RAID would means:

  • You lose the benefits of atomic writes because now the RAID controller has the last say on when a write happens to the disk. Which means you rely on the RAID controllers NVRAM.

  • ZFS also may get lied to if the data was written improperly. ZFS would have to take the RAID controllers word for it.

  • You would also lose repairing files because, from ZFS's point of view, you have a single disk, if the data's integrity is bad, ZFS would have no way to repair it because there is no second copy. (assuming you don't set copies=2)

  • If the RAID drives fall out of sync the RAID drive may take some time to sync depending on the journaling ability. ZFS will resilver the data it finds bad and at least some OSs may run a resilver periodically to ensure the integrity. Again because the RAID will only display one drive to ZFS, ZFS can't help with the repair/rebuild.

  • You would be able to expand the RAID (if the RAID has the capability) and maybe rebuild the ZFS data across more drives. (For me not a big plus considering the negatives so far.)

  • Of course all the snapshot functionality of ZFS would be unaffected (assuming the data doesn't silently get corrupted).

Hardware RAID would almost negate any advantages that ZFS would have. Personally, I wouldn't recommend using anything under ZFS, I would run ZFS on bare metal.

However, if there is an advantage I hadn't considered, I'm open to hearing it.


ZFS mirror will be much better.

Mirror is a very simple config and need almost zero resources from the CPU, but in addition you get a much better pool control in comparison with a hw or a pseudo hw raid.

In my own practice, in the modern systems even having raidz is better than a hw raid5, the performance is only 5-10% slower but ZFS benefits fully cover this (and of course you save a money cuz you don't need a card with a hw raid5 support).