Protecting storage media from failure (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(Flash, 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-7th Edition 19.7 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 19.7 ©Silberschatz, Korth and Sudarshan th Edition Protecting storage media from failure (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 (Flash, 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