Jan22 disk failures

Disk failures

  • Typically as DBMS imp, we assume second storage just works .
  • classic recovery doesn't address media (disk) failures.

But sometimes disk does fail

  • catastrophic plant failure. --- handle via geographic distribution.
  • simple hardware failure ---- "RAID" redundant array of inexpensive disks

How do we detect if a disk is giving bad values?

  • checksums common
  • use a parity bit for each byte --- e.g. n = 8 bits. 1 (parity bit) 00110010
  • for a given block, count # of 0's, count # of 1's
    --- add one more bit at end so that # of 1's is even.
    if I perform a checksum, what is chance that b bit error will go uncaught?
    -- one bit error : destined to catch
    --- two bit error, i.e. switch 10 to 01. -- cannot be caught.
    ---three bit error ...
    50% chance that I catch an error of b bits in a block of size n.

So, the idea is to make blocks small, so good chance one of the blocks catch an error. In the extreme (1 bit block) -- you mirror! costly
In practice, use larger blocks and accept some chance of missed error.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,998评论 0 23
  • 落满忧伤的浅唱 落蝶一样落寞 谁在自己的调子里沉醉 谁在别人的歌声里流泪 谁扬起春的弦 谁的歌,谁轻唱,谁在听 谁...
    月宛央阅读 411评论 12 5
  • 发现苏格拉底和柏拉图时代,论证自己的观点,要么说神话里面的人物是怎么怎么样的,要么做类比,说A是什么样,所以B也就...
    海滩之子阅读 275评论 0 0
  • 这篇文章写于2008年11月16日,得知噩耗的那晚,一晃已十年!她的记忆还历历在目,仿佛从未离开。看完《生吞》,碰...
    阿哲Zack阅读 494评论 5 4
  • 昨天因电话里错把一个同事当成一位朋友赴错了约,将错就错,听了一场女人该对自己好的讲课。 同事辞职做的是某牌子的调整...
    陌上一笑阅读 260评论 0 0