Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an IBM x346 with dual 3.2Ghz Xeons and 2x36GB 15k SCSI disks. I'm running an entirely ZFS-based install of FreeBSD 8.1.

I can configure the bios to mirror the two disks, and then put ZFS on that "single" drive, or I can mirror the drives using ZFS, and install to that.

If I go the all-ZFS route, I suppose I have a little more freedom with how I use the devices (I could set up a fast non-redundant striped area, in addition to my mirrored system install, for example). Do I gain anything as far as error correction goes? Rebuild performance/ease/time?

I know that both configurations are probably the same to within a gnat's eyelash, but I'd like a second opinion.

share|improve this question

4 Answers 4

up vote 14 down vote accepted

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

  • You loose 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 inporperly, ZFS would have to take the RAID controllers word for it.

  • You would also loose 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 consider I'm open to hearing it.

share|improve this answer
    
This is similar to the conclusion I have come to. The only drawback I see is that there is a current FreeBSD bug that causes the boot sector not to be correctly written to both drives (so pulling the first causes a failure). Fortunately there is a patch... –  Paul McMillan Oct 10 '10 at 5:45

One advantage to using the hardware RAID would have been potentially higher performance, since you only have to write to the raid controller once instead of twice. Probably only a little, though, and only if you're already maxed out. I'd use ZFS mirroring myself, though, for all the reasons already mentioned.

re: mirrored raid having hardware compatibility problems, i've run into it. The issue was that the raid controllers put their own identifying data somewhere on the drive. A different brand of raid controller didn't know how to interpret this.

share|improve this answer
    
Two comments do not equal one answer. –  Skyhawk Jan 19 '11 at 5:56

One point which I would consider:

What if the RAID-Controller dies? Is the RAID compatible with other hardware so that you can easily exchange the controller?

With ZFS this is not a problem. Just plug a new controller and that's it.

I use gmirror for UFS and ZFS-RAID for ZFS-Systems ever since. I had a RAID-Controller once (cheap one, sure) which had to resync the drives before booting up the system (BIOS stage) which took endless (1.5TB drive). During that time you can't use the system.

With ZFS/gmirror you reboot the system and it syncs while you are working with it (even not recommended and slowing down the system).

But I would confirm Scott's points (even I would prefer you mark what is a pro and what is a con ;) )

share|improve this answer
    
Mirrored raid generally doesn't have raid hardware compatibility problems, since each drive is a perfect copy. There aren't availability problems for replacing the raid controller, it's an IBM server. That said, I did end up going with pure ZFS. –  Paul McMillan Oct 31 '10 at 17:59

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.