Stable-Storage Implementation(Cont.) Protecting storage media from failure during data transfer(cont.) Copies of a block may differ due to failure during output operation.To recover from failure: 1.First find inconsistent blocks: 1.Expensive solution:Compare the two copies of every disk block. 2.Better solution: Record in-progress disk writes on non-volatile storage(Non- volatile RAM or special area of disk). Use this information during recovery to find blocks that may be inconsistent,and only compare copies of these. Used in hardware RAID systems 2.If either copy of an inconsistent block is detected to have an error(bad checksum),overwrite it by the other copy.If both have no error,but are different,overwrite the second block by the first block. Database System Concepts-6th Edition 16.7 ©Silberschat乜,Korth and SudarshanDatabase System Concepts - 6 16.7 ©Silberschatz, Korth and Sudarshan th Edition Stable-Storage Implementation (Cont.) Protecting storage media from failure during data transfer (cont.): Copies of a block may differ due to failure during output operation. To recover from failure: 1. First find inconsistent blocks: 1. Expensive solution: Compare the two copies of every disk block. 2. Better solution: Record in-progress disk writes on non-volatile storage (Nonvolatile RAM or special area of disk). Use this information during recovery to find blocks that may be inconsistent, and only compare copies of these. Used in hardware RAID systems 2. If either copy of an inconsistent block is detected to have an error (bad checksum), overwrite it by the other copy. If both have no error, but are different, overwrite the second block by the first block