2

It is written everywhere that ZFS is helpful even if you only have one physical device, because it will tell you about data corruption due to bit decay and such.

However, can it actually address such corruption?

In other words, are there any notable benefits in running ZFS as a filesystem on a single physical device?

1
  • Is your question "are there ANY notable benefits to running ZFS as a filesystem on a single physical device" or "are there any notable DATA RESILIENCY benefits to running ZFS as a filesystem on a single physical device"? The answers are very different. The first is yes, the second is effectively no (other than using things like copies=, as others have already told you).
    – Nex7
    Oct 11, 2013 at 17:58

3 Answers 3

5

If you set the COPIES property for a ZFS filesystem to a value higher than 1, then a file that is corrupt can be repaired because there is at least one more copy available.

5
  • 1
    ...provided that the damage is limited to just that one sector/cluster on the disk. It's not a true safe recovery as you'd get with RAID or RAID-Z
    – voretaq7
    Oct 10, 2013 at 20:42
  • so, would it actually aid in the likelihood of not loosing the files? what are the odds?
    – cnst
    Oct 10, 2013 at 20:49
  • 2
    @cnst - it doesn't really matter what the odds are. You need to assume that it's going to fail and have a well-tested backup.
    – EEAA
    Oct 10, 2013 at 20:57
  • @EEAA, no, the odds do matter. If such a scenario doesn't add much to reliability, then one'd rather find a better use to such space that would otherwise be occupied by these not-so-useful copies.
    – cnst
    Oct 10, 2013 at 21:14
  • @cnst Odds are when a HD goes it has a short period where some clusters are readable, followed "shortly" by catastrophic failure. If you catch the drive during that partial failure, odds are very good you can recover your files. You'd probably be interested in reading Google's HD Study.
    – Chris S
    Oct 11, 2013 at 1:27
3

I guess this depends on how the files gets corrupted...

Sure, I run ZFS in single device arrangements (atop block devices presented hardware RAID controllers, for instance). I don't know that I'd run with a single physical disk, though.

As others have mentioned, you can mitigate some of the corruption risk by using the zfs copies= feature. RAID with multiple ZFS-managed devices would still be better. But with ~4 years of ZFS experience, I've never actually encountered corrupted data.

2
  • hm, i don't think you're supposed to run zfs on a single device with one copy, on top of a hardware raid...
    – cnst
    Oct 10, 2013 at 21:03
  • 1
    You definitely can, and there are no rules!!
    – ewwhite
    Oct 10, 2013 at 22:04
0

Yes, you can have data stored in multiple copies:

https://blogs.oracle.com/relling/entry/zfs_copies_and_data_protection

Link from Web Archive project http://web.archive.org/web/20131003025617/https://blogs.oracle.com/relling/entry/zfs_copies_and_data_protection

So you would vastly reduce available disk space, but potentially be able to recover from a specific area of corruption. (I haven't tried it).

1
  • @OleTange I've updated it to a web archive link. NB. it's 8 years since this answer, and the blog post was 6 years old then. May 14, 2021 at 2:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .