Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am in the process of planning a file server for private usage (small amounts of various kinds of data, but mainly photos, videos, music). I will probably use NAS4free/FreeNAS and want to give ZFS a try.

My focus is not speed, it is reliability and data safety. Nevertheless, I want to keep things 'cheap', so I want to run ZFS mirrored among two disks ('raid 1' fashion). I will buy a consumer board, so no hardware raid controller. So far, I am thinking to use the ZFS 'mirror' command for this or whatever corresponding option FreeNAS provides.

When reading about this topic, I mainly see people using three disks and then using RAIDZ-1 which renders them immune in case one disk fails. What I do not quite understand so far is what is the problem with having ZFS mirrored among two disks only? How will I notice when one disk fails? What is the failover strategy? Do I just get a message that the file system is not usable, because disk A is failing and that I should replace it now? I hope that one can achieve a real benefit when running two mirrored disks than just using one.

Given two equivalent disks, which ZFS mode would you run in?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

For two disks, you want mirror mode. This will cause the drives to be exact images of each other. If ZFS tries to read a block of data from the drive and it fails verification, then ZFS will automatically try to repair it. If the repair fails, it'll read it from the other drive and mark the bad drive as failed. You should get a notification that a drive failed, but the filesystem will still be usable. You get some read speed improvements, but no write speed improvements. As long as you have at least one drive from a mirror set, you have all of your data.

With raidz, you need at least three drives. They function similar to RAID5 where (effectively) one drive stores recovery information, and the other drives store data. It can handle any drive failing, as long as only one drive fails at a time.

raidz2 and raidz3 are the same as raidz, except that they can handle two or three drives failing, respectively. They require more drives to operate and reduce effective capacity, though.

share|improve this answer
Thanks for clarification. So with RAIDZ incorporating three drives, there is a net capacity larger than one of the drives has, yes? Would it be two disk sizes in this case? – Jan-Philip Gehrcke Jul 22 '13 at 19:38
@Jan-PhilipGehrcke Yes. Assuming the drives are all the same size, a mirror array has the same usable size as 1 drive (no matter how many disks you use), whereas RAIDZ has N-1 drives of usable space. (Three drives gives you two drives of usable space, five drives gives you 4 drives of usable space, etc.). – Darth Android Jul 22 '13 at 22:09
"With raidz, you need at least three drives." -- Not true for raidz (single parity). Per the ZFS docs, "You need at least two disks for a single-parity RAID-Z configuration and at least three disks for a double-parity RAID-Z configuration." – Poulsbo Jun 19 at 17:03

ZFS mirror is the way to go if you have two similar disks and look for reliability and data safety.

RAIDZ is a cheaper solution as a lesser percentage of storage is dedicated to data security but mirroring is faster.

About failure detection and handling, you need to monitor your pool (zpool status) to know if errors are present.

You might regularly scrub your pool to check its health (zpool scrub poolname)

ZFS will automatically self-heal those it can but should a whole disk fails, you would need to add a new disk to the pool to replace the broken one. The pool will then automatically resilver the new disk (i.e. copy the data from the healthy mirror side).

I'm not familiar with NAS4Free so only suggest the CLI commands to use. The GUI should provides a front end for most or all of them.

Note that NAS4Free Raid levels (0/1/5 and combination) are different than ZFS stripes/mirror/raidz and combination. I would suggest to only use the latter, i.e. there is no point to create a ZFS pool on a volume composed of a software raid 1 (mirror). You would lose many features ZFS provides.

share|improve this answer
Thanks for your input. Looks like NAS4Free supports the main features of ZFS storage pools, such as mirror:… – Jan-Philip Gehrcke Jul 22 '13 at 20:20
Hopefully it does. I was only warning you not to use traditional mirroring instead:… – jlliagre Jul 22 '13 at 21:10

raid0 is not mirror, raid1 is, and you can use 2 disks to set up raid1, which can tolerate one failed disk. raid0 cannot tolerate any disk failure.

however, you need at least 3 disks for raidz.

share|improve this answer

Your Answer


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.