2011年10月4日 星期二

Linux處理硬碟壞軌工具

檢查壞軌


(v: verbose, s:show progress )
badblocks -vs /dev/sdb
加“-n” 測試非破壞性寫入
badblocks -nvs /dev/sdb

預先偵測


ATA 硬碟都有支援 S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology)
安裝smartmontools, 用smartctl來看
smartctl --attributes /dev/sdb
如果以下幾組數字不為0時就要注意了:
Reallocated Sectors Count/Reallocations event count,/Current Pending Sector Count/Uncorrectable Sector Count

備分


dd if=/dev/sdb of=sdb.img
要更安全用dcfldd,會檢杳hash
壞軌無法用dd時就用dd_rescue,可以跳過壞掉的資料

更深入請看: Linux 上處理壞軌硬碟的兩三事

沒有留言: