this post was submitted on 20 Dec 2023
7 points (88.9% liked)

TrueNAS

582 readers
1 users here now

Welcome to the unofficial TrueNAS community!

Here for all things TrueNAS whether you need help with your core, scale, or enterprise edition setups or if you just want to discuss random stuff pertaining to TrueNAS!

Useful Links:

TrueNAS:

Truecharts:

Main MOD: @[email protected]

founded 1 year ago
MODERATORS
 

Hey guys! I got my home lab setup going nicely now. One mirror vdev ZFS for my Nextcloud, granting very good performance! Small question though: I got two extra drives now and was thinking if it is worth it adding it already as extra mirror vdev. My question is the following:

Will resilvering of a single disk be quicker if I have my data striped over two mirror vdev than if all my data is in a single mirror vdev?

In other words, I was wondering in that sense if it is safer to replace a disk due to shorter resilver?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 10 months ago (3 children)

No, not really. You're going to want to read the TrueNas forum primers for ZFS and vdevs if you haven't already. It's critically important.

The data parity, error correction, and rebuild is within the zdev. If you lose a drive in the mirror, it's rebuilt from the other drive in the mirror.

If you lost a disk in a z1 vdevs, it's rebuilt from the other drives in the set.

A key concept of there is no parity and error correction during the period of a loss of a drive in a mirror or z1 until the resolver is complete. That's why there's z2/3/... Or you can create mirrors with more than two disks. Obviously some trades on capacity.

The rebuild speed is more about the drive size. Spinning drives can only write so fast, doesn't matter how many other disks in the vdev. 4TB is long time, 12TB+ is eternity. SSD, much faster.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago) (1 children)

I wasn't completely clear I think. I currently have 1*mirror vdev of 8TB each disk. I'm thinking of adding another mirror vdev of the same capacity. That would stripe the data between both. Meaning that per vdev there would be less data. That would lead to quicker (thus safer?) resilversing in the case of a singular disk failure per vdev, correct?

[–] [email protected] 1 points 10 months ago (1 children)

Short of, yes.

If you have two 8TB drives in mirror, oddly, ZFS doesn't move the existing data when you add a second vdev of two drives. All newly written data will be stripped across both sets. If you want your existing data stripped, you have to move it back on.

As for rebuild(resilver), the data on the other device in the vdev and CPU power rebuilds the missing data.

If you have less data on each vdev, then only then could you consider it faster than if the vdev had more data on it. You are basically making the point that restoring less data is faster than more data.

People usually end up with more data as they expand a pool. This makes rebuild slower.

If you plan on lots of data, or want more protection, use z2. If you need performance like hosting VMs or databases, then use mirrors.

[–] [email protected] 1 points 10 months ago

I think for now that should be fine. I got daily cloud backups, and got a way to remotely turn off the PC if a disk degrades or faults. I might also even get a disk as hot or cold spare just to be sure. With 2 mirrors I got quite a bit of performance, and in a sense better off than with a single mirror.

I'm using the storage to host Nextcloud, and the performance was just not really good enough with a singular disk of speed. I'm hosting it for me and the wife so we can both share pictures with each other without needing a privacy invasive third party :)

load more comments (1 replies)