On Sun, 28 Dec 2008, Orvar Korvar wrote: > On a Linux forum, Ive spoken about ZFS end to end data integrity. I > wrote things as "upon writing data to disc, ZFS reads it back and > compares to the data in RAM and corrects it otherwise". I also wrote > that ordinary HW raid doesnt do this check. After a heated > discussion, I now start to wonder if I this is correct? Am I wrong?
You are somewhat wrong. When ZFS writes the data, it also stores a checksum for the data. When the data is read, it is checksummed again and the checksum is verified against the stored checksum. It is not possible to compare with data in RAM since usually the RAM memory is too small to cache the entire disk, and it would not survive reboots. > So, do ordinary HW raid check data correctness? The Linux guys wants > to now this. For instance, Adaptec's HW raid controllers doesnt do a > check? Anyone knows more on this? My understanding is that ordinary HW raid does not check data correctness. If the hardware reports failure to successfully read a block, then a simple algorithm is used to (hopefully) re-create the lost data based on data from other disks. The difference here is that ZFS does check the data correctness (at the CPU) for each read while HW raid depends on the hardware detecting a problem, and even if the data is ok when read from disk, it may be corrupted by the time it makes it to the CPU. ZFS's scrub algorithm forces all of the written data to be read, with validation against the stored checksum. If a problem is found, then an attempt to correct is made from redundant storage using traditional RAID methods. Bob ====================================== Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss