ZFS newbie coming from RAID needs handholding...erm advice...

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Fahd

New Member
Aug 3, 2017
19
3
3
40
Planning to use ZFS for shared storage and need advice...

This system has 8 x 3.5" drive bays and I was thinking of going RAID-Z2 with 8x2TB drives that I already have. I THINK I need 2 pools - 1 private pool for storing database backups and 1 pool for public file sharing.

Backups are nightly full backups of about 25 GB (total) from linux and windows systems staggered every hour. I'm not sure how much usage the file server will get. I'd say no more than 5-10 active clients at any given time.

Would appreciate any advise on setting up the pools, vdevs, etc. There is quite a bit of new terminology and concepts to get acquainted with coming from raid.

TIA! :)
 

ttabbal

Active Member
Mar 10, 2016
747
207
43
47
I prefer to use one pool, with multiple filesystems sharing it. That way, the available space is shared with everything rather than pre-allocated. Zvols are similar, but are more like one large file you allocate then write a filesystem to. Useful for VMs and ISCSI more than normal use for me.

zpool create pool...
zfs create pool/private
zfs create pool/public
etc...
 
  • Like
Reactions: Patrick

MiniKnight

Well-Known Member
Mar 30, 2012
3,072
973
113
NYC
I'd third what @ttabbal and @gigatexal said. One pool here.

How old are the 2TB drives? I'd consider doing 4x 8TB or 2x 12TB these days. Fewer drives use less power and newer drives will fail less.
 
  • Like
Reactions: Patrick

apnar

Member
Mar 5, 2011
115
23
18
I’d go 6x8tb in z2. Bestbuy just had a deal for $129 for the external 8tb WD ones which you can shuck for White labeled Reds. I’m hoping they are back in stock for Black Friday.

I️ still like to keep my zpools at a power of 2 (minus parity). May not be as important as it used to be but believe it maximizes usable space.

Also, that leaves two of your slots for mirrored OS drives.
 
  • Like
Reactions: Patrick

Fahd

New Member
Aug 3, 2017
19
3
3
40
Thanks for all the replies...

Not familiar with zvols, some reading and research to do I guess.

1 pool with 2 shares makes sense. Any advice on the vdevs? 1 vdev with all 8 drives or split that into 2 vdevs with 4 drives each or something else entirely?

The drives are within 1-2 years old. They're WD Reds and Seagate NAS/IronWolf. Unfortunately, drive prices are much higher here for me about $150 for 2TB, $250-300 for 4TB and so on. And I already have these 2TB drives. I figured I could just replace them with bigger drives later as needed.

Hmm...zpools at a power of 2 (minus parity) sounds interesting and will have to read up on this. I already have a PCIe SSD for the OS. So I still have 8 bays for storage and I already have the 8 drives as well. Is there an option for a "hot spare" and is it recommended?

Thanks again!
 

apnar

Member
Mar 5, 2011
115
23
18
Are you looking to optimize for performance, available space, or redundancy?

Likely the easiest is to throw all 8 disks into a single z2 vdev. Gives you space of 6 disks and lets 2 fail.
 

Fahd

New Member
Aug 3, 2017
19
3
3
40
Reliability > Performance > Space in that order. Space is not even a concern really. Have been getting by with a 2 x 2TB RAID1 mirror so far.

I'm considering going RAIDZ3. If this were a hardware raid, I would go one big raid10 - 8 x 2TB RAID10.

Thanks!
 

apnar

Member
Mar 5, 2011
115
23
18
A z3 obviously gives you great redundancy. Performance wise for non-sequential stuff you wouldn’t see much more than one disks worth of performance (unless you add other cache options). Similar to hardware raid you’d get the best performance with a stripe across 4 mirrors but then you can only lose 1 disk (if you’re unlucky).

If you really don’t care about space but want more redundancy and a tad more performance you could do two 4 disk z2 vdevs. wastes half the disks to parity but you can still lose any 2 and get a little better performance than one big vdev.
 

ttabbal

Active Member
Mar 10, 2016
747
207
43
47
You can do RAID10 in ZFS. Just create a bunch of mirror vdevs in a single pool. This is the highest performing setup in ZFS that has redundancy. It also has a couple bonuses. You can add/upgrade 2 drives at a time to add more space later. With raidz, you need to upgrade all the drives in the vdev to increase space. Replacing failing devices is also significantly faster. So when there is a problem, it can be fixed quicker.

The down side is loss of space, and that if the wrong 2 drives die, the pool goes with it. With raidz2 you can lose any 2 drives without data loss. If you keep an eye on the system with automatic scrubs and SMART testing, you can detect failures coming and plan ahead.

The rule of thumb is that raidz vdevs perform about the same as a single drive. Adding more of them is about a linear increase in performance. Mirrors read almost 2x as fast, and stripe similarly.

My requirement is redundancy, speed, then space. So I run mirrors. If I decide single mirrors aren't safe enough, I can always add more drives and do 3-way mirrors. I also like being able to upgrade only 2 drives for more space. It's your data, so you are the only one who can really know the best way for you. Everything is a tradeoff. :)
 

Fahd

New Member
Aug 3, 2017
19
3
3
40
Thanks everyone for all the responses. I am going to go 8 x Z3 or with 2 - 4 x Z2.