数据库崩溃 如何恢复?


  昨天,一个朋友公司的数据库崩溃。

  这再次印证了我反复提到的一个命题:数据库也需要休息。

  每逢节假日,数据库也经常会自我选择放假。

  以前我说:年终难终 进入数据库事故多发期,一年一度今又是,记得另外一个圣诞节,我还和Biti一起在北京的时候,同样遇到一个上海的朋友数据库崩溃,我们远程指导这位朋友恢复了数据。

  这次的事情是这样的。

  1.首先主机宕机,磁盘出错

  看到以下这类错误,一般你的数据都很危险了


  Dec 24 13:52:13 kernel: sda5: rw=0, want=18298437640, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=10384710304, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=8756273744, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=5023902272, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=6730428824, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=8884660792, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=9182513808, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=5002858800, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=6730428824, limit=163846872
  Dec 24 13:52:13 kernel: attempt to access beyond end of device
  Dec 24 13:52:13 kernel: sda5: rw=0, want=15872410168, limit=163846872 

  2.数据文件大量损坏

  当然这次也不例外,大量文件损坏,dbv大量如下错误:


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3