Hacker News new | ask | show | jobs
by wayne_h 4665 days ago
I don't see how zfs can detect the problem any sooner than any other filesystem.

If the problem is caused by the controller wrapping at 2tb then I wouldn't expect zfs to figure it out until later when it tries to read files back and finds damage.

Lets say zfs writes a file at 2tb but due to wrapping its actually written to 0 tb. Then zfs reads the file at 2tb to verify that is good. But the file appears to be fine because its really reading it again at 0tb. At some point zfs will detect a problem but I don't see how it can catch the problem instantly.

1 comments

The difference is, zfs can detect it. The only other fs in production use that can is Oracle's zfs clone named btrfs.
Oh, I see what your are saying ... that zfs can detect corrupted files, true.

Whats likely to happen in this case is this: The first blocks of the disk contain the superblock, labels-descriptors and other filesystem metadata. Most of which will be sitting in cache. The damaged overwritten area at 0mb won't be noticed for some time - like next time the volume is mounted. The filesystem will eventually notice the damage and go into some recovery mode or halt to protect itself. Zfs has lots of redundancy so the beginning volume labels could be rebuilt.

One benefit of zfs will be that you can tell which recovered files are good or bad.