ZFS and integrity of data

New About Yours API Help
2.4 KB, Plain text
Hi to all of BSD Now makers


I’m a listener from the first episode of BSD Now show. I have written in some time ago and I hope I haven’t burned all the bonuses to ask questions.

I had a conversation about how and where ZFS takes care of the data. We haven’t agreed on some areas, so I came to the grand master to help us clarify this topic. The areas in question are quite similar, but still important to distinguish them. Please correct me while Benedict reads the mail. Also if I used some wrong ZFS terms.

1)
ZFS takes care of integrity of the data inside one pool, ZFS doesn’t “seek help” from other pools. If you have the same file in pool A and B, ZFS checks if blocks of data are correct in each pool separately. If in pool A some blocks of a file get corrupted, ZFS will try to copy data from another vdev in pool A if one is available. It will not try to copy data from pool B. (Even pool B is exact copy of pool A.)

2)
Errors are not corrected. ZFS can’t correct data. It can only detect the corruption and, if available, it can copy data from other vdev. So data corruption is not corrected, the data corruption gets replaced from correct copy of data from the same pool.

3)
Assuming data gets corrupted during wire transfer (ZFS replication), it will be copied to the new pool corrupted. If the new pool is a mirror, it will be copied to both “disks”. ZFS detects corrupted data and lets you know, but it cannot correct the data if data was corrupted during wire transfer and copied to both disks.

4)
There's no ZFS checksumming or other ZFS integrity verification in transit. During ZFS replication TCP takes care of the integrity of data in transit (that data from pool A arrives unmodified to pool B). ZFS doesn’t check integrity of data in transit.

5)
During replication ZFS copies blocks of data, it doesn’t copy files. If some data gets corrupted in a pool, ZFS doesn’t know which file that is, it just knows that some data is corrupted. Or does it know which file is corrupted?

6)
Does ZFS check data integrity during replication? When does it do it: a) ZSF checks for integrity of the data in pool B during replication or b) immediately after the replication finishes or c) does not check for integrity of the data, you have to run scrub?


Thank you grand master for clarifying the slight variations of question “how and where ZFS takes care of the data”.


Much obliged. 

Best regards,
Bostjan
Pasted 2 months, 2 weeks ago — Expires in 287 days
URL: http://dpaste.com/1Q14C6H