Newbie question about optimal home configuration for NAS w/ 4x4 TB

Status
Not open for further replies.

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
This probably has been addressed before, but I can't find it any place. So please forgive me if I'm asking for something that's already been discussed elsewhere.

I am finalizing my first DIY home NAS, which will be used primarily for media streaming (via Plex &/or Kodi) and for storing a library of mainly pdf files and maybe some image files, such as *.png, uncompiled program files (Python, R, etc.). I will access the library primarily via WebDAV, and the whole shebang should eventually be accessible remotely, for example while traveling away from home.

I'm trying to figure out how to plan and to configure disk storage strategy. Budget and space needs suggest starting with 3-4 WD Red drives @ 4TB each. Constantin Gonzalez's blog post about configuring a home server makes a very convincing argument for using mirrors in an application such as this. But I'm still trying to wrap my head around the ZFS concepts and nomenclature of vdevs, pools, RAID-Zn, etc. So I'm writing to ask your advice. What's the best way to configure this?

Putting nomenclature aside for now, it seems best to combine pairs of drives, creating two 8TB equivalents, and then mirror them for redundancy. I will then move data off my current commercial NAS drive (an obsolete Netgear ReadyNAS with 2 4TB WD Reds) and onto the new, DIY NAS. Once this is done, and I'm satisfied everything is working OK, I'll move the old drives from the ReadyNAS to the DIY. This will then allow me to create a 3-way mirror, as Constantin suggests. This online calculator suggests this will yield 5.57 usable TiB initially and 8.36 when the additional drives are erased and moved from the ReadyNAS. But, to be honest, I don't understand why the latter would add additional usable storage.

So my first question is do you think this is the way to go?

My second question is how does this translate to a FreeNAS configuration? As far as I can tell, with my very limited understanding of ZFS, this configuration would first combine 2 physical volumes into a single logical volume (vdev), with 8TB of raw storage. It would do this twice, creating 2 8TB vdevs. Then these would be mirrored and combined into a single ZFS pool. (Or is it, combined into a single pool and then mirrored?) When the two other drives are free, they'd also be combined into a single vdev, added to the pool, and mirrored.

Is this right? Is this the best configuration for this application?

Thanks!
 

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
With 4 drives you can do 2x mirrors or RAIDZ1 or RAIDZ2
RAIDZ1 is usually not recommended because it offers only 1 disk redundancy. Reason 5 is also why mirrors are better off than RAIDZ1 in a 4 drive configuration. However RAIDZ1 will give you the most amount of space in a 4 drive single vdev configuration.

Mirrors and RAIDZ2 will give you the same amount of space : pros and cons are
  1. Mirrors allow you to add 2 drives at a time at your pace vs RAIDZ2 requires all 4 drives to be available from day 1
  2. Mirrors allow you to have different sized drives (in different mirrors) vs RAIDZ in general wouldn't. (You can have different sized drives, but you will only see the space as the smallest one)
  3. Mirrors provide more IOPS (2 vdevs) vs RAIDZ2 (1 vdev)
  4. Mirrors re-silver much faster in case of failed drives because you have a full copy sitting in the other drive within the mirror vs RAIDZ has to calculate the parity during re-silver making it slower.
  5. Mirrors offer 1 drive redundancy within a vdev but 2 drive redundancy across the pool vs RAIDZ2 offers 2 drive redundancy in that vdev and across the pool
 

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
My second question is how does this translate to a FreeNAS configuration? As far as I can tell, with my very limited understanding of ZFS, this configuration would first combine 2 physical volumes into a single logical volume (vdev), with 8TB of raw storage. It would do this twice, creating 2 8TB vdevs. Then these would be mirrored and combined into a single ZFS pool.
Correct.
When the two other drives are free, they'd also be combined into a single vdev, added to the pool, and mirrored.
I am not sure what you mean here.

Is this right? Is this the best configuration for this application?
For your use case, you can go with either any configuration -- a mirror or a RAIDZ2 if you need 2 drive redundancy. There comes a point where mirrors give you less space than a RAIDZ2 but that come in with 6 drives or more. With 4 drives -- you can choose either one.
This will then allow me to create a 3-way mirror
IMO, you don't need a 3-way mirror. A 3-way mirror would only give you 1 drive worth of raw space. A 2-way should be sufficient.
 
Last edited:

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
I am not sure what you mean here.

Sorry I was't more clear. Here's what I mean.

Currently I have 2 drives in my existing NAS, a Netgear ReadyNAS, which I am replacing with a new, DIY NAS. Because I want to increase my storage space and have redundancy in the new NAS, it will have 4 drives, which will be combined into 8TB pairs and then mirrored. Once it's configured and running, I'll copy the current data from the old ReadyNAS to the new DIY NAS.

Once the new, DIY NAS is up and running this way, I will no longer need the old ReadyNAS. So I can take the two drives currently in the ReadyNAS, erase and reformat them, and move them to the new DIY NAS. These drives have been in use for several years, so I do not want to rely on them alone. Otherwise, I might use them to increase the total storage in the DIY NAS. Instead, adding them as a third mirrored pair will increase redundancy and make the mirrored setup very secure.

I can't think of any better way to use the existing two drives.
 

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
redundancy in the new NAS, it will have 4 drives, which will be combined into 8TB pairs and then mirrored. Once it's configured and running, I'll copy the current data from the old ReadyNAS to the new DIY NAS.
So in total you will have 6 drives?

In that case I would keep the ReadyNAS as is and use it as a backup to your FreeNAS.
If the drives fail in ReadyNAS...since you say they are old, replace them with 8TB drives so 2 drives in ReadyNAS can be the backup for your DIY NAS with 4x4TB drives
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Because I want to increase my storage space and have redundancy in the new NAS, it will have 4 drives, which will be combined into 8TB pairs and then mirrored.

This is not how ZFS works. Redundancy is created at the lower level (at vdev level), so with 4 disks you would create two mirror vdevs. If there is more than one vdev (two in the case discussed here), ZFS stripes over these vdevs.

See also
https://forums.freenas.org/index.ph...ning-vdev-zpool-zil-and-l2arc-for-noobs.7775/
https://forums.freenas.org/index.php?threads/terminology-and-abbreviations-primer.28174/
https://forums.freenas.org/index.php?threads/comprehensive-diagram-of-the-zfs-structure.38865/
http://doc.freenas.org/11/zfsprimer.html
 

pro lamer

Guru
Joined
Feb 16, 2018
Messages
626
This is not how ZFS works. Redundancy is created at the lower level (at vdev level), so with 4 disks you would create two mirror vdevs. If there is more than one vdev (two in the case discussed here), ZFS stripes over these vdevs.
One can argue that the final outcome would be similar. But of course @MrToddsFriends is right.

@Monkey_Demon 's setup may look like this: a pair of 2-way or 3-way mirrors.

Anyway I'm not sure if a 2-way mirror can be converted into a 3-way mirror. I can remember from a primer that a single drive vdev can be converted into a 2-way mirror by adding second HDD but I can't remember if a third one can be added as well...
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Anyway I'm not sure if a 2-way mirror can be converted into a 3-way mirror. I can remember from a primer that a single drive vdev can be converted into a 2-way mirror by adding second HDD but I can't remember if a third one can be added as well...

zpool attach can be used to convert a 2-way mirror into a 3-way mirror just in the same way, see for example
https://docs.oracle.com/cd/E19253-01/819-5461/gcfhe/index.html

If one intends do either of this (converting a single disk into a 2-way mirror or converting a 2-way mirror into a 3-way mirror) the partitioning has to be done by hand, too. See for example older posting containing a minor glitch/typo and newer posting linking to external blog. At least as long this functionality is not included in the FreeNAS GUI.

Edit: Even more recent posting in the same thread, adding -a 4k (alignment) option to gpart commands.
 
Last edited:

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
This is not how ZFS works. Redundancy is created at the lower level (at vdev level), so with 4 disks you would create two mirror vdevs. If there is more than one vdev (two in the case discussed here), ZFS stripes over these vdevs.

Thanks for the links. I'll read them as soon as I have the chance. But if I understand you correctly, to go from 4 to 6 disks, I'd have to start with 2 vdevs having 2 disks each and then add a third disk to each vdev. Correct?
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Thanks for the links. I'll read them as soon as I have the chance. But if I understand you correctly, to go from 4 to 6 disks, I'd have to start with 2 vdevs having 2 disks each and then add a third disk to each vdev. Correct?

If you are heading to two 3-way mirror vdevs, yes, act as shown in the forum postings linked above using the console.

If, on contrary, you want to add a third 2-way mirror vdev to an existing pool already consisting of two 2-way mirrors (also a way to go from 4 to 6 disks, albeit with much less redundancy) this additional mirror vdev can be "just" added using the FreeNAS GUI.
http://doc.freenas.org/11/storage.html#extending-a-zfs-volume
 
Status
Not open for further replies.
Top