ZFS with two disks: does this make sense? what is the safest configuration?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle4
--
Chapters
00:00 Zfs With Two Disks: Does This Make Sense? What Is The Safest Configuration?
01:18 Accepted Answer Score 20
02:24 Answer 2 Score 7
03:43 Thank you
--
Full question
https://superuser.com/questions/622783/z...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#freenas #zfs
#avk47
ACCEPTED ANSWER
Score 20
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.
ANSWER 2
Score 7
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.