12.7.6 Problems with RAID
Unfortunately, RAID does not always assure that data are available for the operating system and users.
A pointer to a file could be wrong, for example, or pointers within the file structure could be wrong.
Incomplete writes, if not property recovered, could result in corrupt data.
Some other process could accidentally write over a file system's structure, too RAID protects against physical media errors, but not other hardware and software errors.
As large as the landscape of software and hardware bugs is, that is how numerous are the potential perils for data on a system
The Solaris ZFS file system take an innovative approach to solving these problems.
It maintains internal checksum of all blocks, including data and metadata.
Added functionality comes in the placement of the checksum.
They are not kept with the block that is being checksum.
Rather, they are stored with the pointer to that is block.
Consider an inode with pointers to its data.
Within the inde is the checksum of each block of data.
If there is a problem with the data, the checksum will be incorrect, and the file system will know-about it.
If the data are mirrored, and these is a block with a correct checksum and one with an incorrect checksum, ZFS will automatically update the bad block with the good one.
Likewise, the directory entry that point to the inode has a checksum for the inode.
Any problem in the mode is detected when the directory is accessed.
This checksumming take places throughout all ZFS structure, providing a much higher level of consistency, error detection, and error correction than is found in RAID disk sets or standard file systems.
The extra overhead that is created by the checksum calculation and extra block read-modify-write cycle is not noticeable because the overall performance of ZFS is very fast.