The ZFS "copies" features is useless: Change my mind

Was thinking that if you had a boot disk with many many boot environments… say nightlies… dedupe would really allow you to get some space savings :wink:

Most nightlies are very similar on a file by file basis I think, but they aren’t clones.

And then the copies would allow bitrot protection :wink:

1 Like

…all of that in a zvol for virtualised TrueNAS on TrueNAS, I suppose?
Principle: Why make it simple when you can make it complicated?
Corollary: Why make it complicated when you can make it inextricable?

:slight_smile:

Of course, if it was on TrueNAS, I wouldn’t use copies=2.

It would need testing to validate - but I would expect there is read speed advantages having multiple copies. This assumes that ZFS can understand that there are multiple copies that it can read from.

Coming from a MS landscape, this is the reason there are multiple copies along with redundancy, something mildly more advanced than a RAID esque approach.

While I can come up with some hypothetical scenarios of how to squeeze more speed (read IOPS to be precise) from it, it’s hard to believe that developers have spent time on this feature. OTOH, sometimes developers even spend time on animated poo.

Sounds interesting. Can you provide some links?

Granted its not the primary reason, its a pretty useful benefit. The storage efficiencies are horrid if you are looking for “maximum storage and minimal performance” - this is the other end of the scale.

IIUIC, the article is about multi node copies. And this topic is about single node disk copies.

1 Like

I signed up for this forum to praise @winnielinnie

I read the whole thread and decide to stop using copies=2.

Thank you for saving my time and money!

3 Likes

I’ve not re-read this entire thread, so this may have been covered. The best use case for “copies=2” in the TrueNAS context is for a single boot-pool device. Really for SSD or NVMe, (even if over USB), boot-pool devices. Stock cheap USB flash drives would likely not work well with the additional writes…

Those users that need higher availability of their NAS, but don’t have the ports or device for a 2nd boot device, can use “copies=2”. It’s not perfect, but does increase reliability and uptime. Further, with smaller SSDs & NVMes being in the >100GBs range, there is little reason not to use the space. Hey, even “copies=3”!

2 Likes

That is an interesting idea, but I wonder why you think this would boost uptime.
Would it even be able to decide form wich copy to boot from?
Would you select that with a bootloader?
And why should my SSD fail on let’s say 0-100GB but not on my second copy 100-200GB? IMHO if something goes wrong SSDs, it really goes wrong aka not showing up anymore.
How would you detect it, just manually by looking at it?

That’s not what “copies=2” means.

Each block is stored twice. With a checksum. In the event that a block can’t be read correctly, the other is used, and the faulty block is corrected.

2 Likes
Have you ever heard of SSD's stroke?

If only I had mad skills like Winnie… I would turn it into another meme.