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 am planning on setting up a FreeNAS ZFS pool using two 2 tb drives and two 1tb drives. I would like to have data redundancy somehow. I read this post which seems to suggest my two options are to lose 1tb per 2tb drive using RAIDZ or to use this command (which doubles the space required for data redundancy):

zfs set copies=2 poolname

Is there a better way to handle this and acheive something more like Drobo's Beyond RAID or Netgear's XRAID? Alternately, could I partition each 2tb drive into 1 tb partitions and put both partitions in the pool?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

There is a better way, create a single 3 TB pool composed of two mirrors.

zpool create test mirror disk1 disk2 mirror disk3 disk4

with disk1 and disk2 being the 1TB disks and disk3 and disk4 being the 2 TB ones.

Edit:

Should you want to maximize size and do not care that much about performance or best practices, you can partition all the drives with equal size partitions (or slices) and create a 4 TB hybrid pool with a 4 vdev RAIDZ and a 2 vdev mirror.

zpool create -f test raidz d0p1 d1p1 d2p1 d3p1 mirror d0p2 d1p2

Note the "-f" option required to force the command to accept the replication level mismatch.

share|improve this answer
    
Thanks for the information. So that would be like normal mirroring where redundancy "costs" 100% extra, it appears? Is there a way to achieve a RAID5-like 50% "cost" for parity instead? How is the performance of this configuration versus performance of a ZRAID/RAID5 setup with 4 equal sized drives? –  Timothy R. Butler Jan 1 '12 at 19:28
    
@TimothyR.Butler You can't create a mirror of the 1TB and apply RAIDZ over the two 2TB and the 2TB mirror, it just doesn't work that way. To use RAIDZ you need to have equal size drives (or you'll give up the extra space on the larger drives, or you'll have to start getting into non-recommended configurations). The two mirror configurations recommended by these answers are your best recommended configurations. –  Chris S Jan 1 '12 at 20:12
    
Thanks jilliagre and @chriss for the comments. I think I may just buy two more drives and call it a day. That second command jilliagre just added is intriguing though... Would I be correct in assuming performance would be as good or better than anything mentioned above if I did a 4x2TB RAIDZ? –  Timothy R. Butler Jan 1 '12 at 22:53
    
@TimothyR.Butler A 4x2TB RAIDZ would have a slight performance hit compared to dual 2x2TB Mirrors (RAID10 basically). Those two would have the best performance of anything we've discussed here. –  Chris S Jan 2 '12 at 0:05

This depends on how much data storage you need. You can create two pools of 1TB and 2TB each, using RAID 1. If not, see if you can acquire like-sized disks and try RAID 1+0 or RAIDZ.

share|improve this answer
    
Thanks. Would two pools be better than one pool with two RAIDZ's in it? –  Timothy R. Butler Jan 1 '12 at 19:23
    
@TimothyR.Butler Each mirror of disks is a vdev in ZFS. You can't remove vdevs from a zfs pool; so once the pool has two mirrors in it, it must always have at least those two (you can add more, just not remove). If you ever wanted to switch to something with less vdevs you'd have to destroy the pool and start from scratch. So by starting with two zpools you have the flexibility of separating them later if you want, but you lose the flexibility of sharing the storage space automatically (you'd have to put files on one pool or the other as they fill). –  Chris S Jan 1 '12 at 19:54
    
@ewwhite, I know what you mean by "RAID 1+0" but there's no way to explicitly do this in ZFS... some may be confused by the difference. –  Chris S Jan 1 '12 at 19:59

From the ZFS admin guide:

"The devices can be individual slices on a preformatted disk, or they can be entire disks that ZFS formats as a single large slice."

So yes, you could create two 1-GB partitions on those 2TB drives, use them for RAID-Z vdev and the remaining space for non-redundant storage.

However, according to the ZFS Best Practices Guide, you may experience degraded performance:

For production systems, use whole disks rather than slices for storage pools for the following reasons:

  • Allows ZFS to enable the disk's write cache for those disks that have write caches. If you are using a RAID array with a non-volatile write cache, then this is less of an issue and slices as vdevs should still gain the benefit of the array's write cache.

  • For JBOD attached storage, having an enabled disk cache, allows some synchronous writes to be issued as multiple disk writes followed by a single cache flush allowing the disk controller to optimize I/O scheduling. Separately, for systems that lacks proper support for SATA NCQ or SCSI TCQ, having an enabled write cache allows the host to issue single I/O operation asynchronously from physical I/O.

  • The recovery process of replacing a failed disk is more complex when disks contain both ZFS and UFS file systems on slices.

[snip]

share|improve this answer
    
Wonderful cut-n-paste job, but all that's been covered in the other two answers already. –  Chris S Jan 2 '12 at 5:13

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.