close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_delta.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
2010-07-18
- [備忘] 修復 reiserfs 壞軌問題
- [狀況] 以前裝的一台 server 因為電源瞬斷,復電後發生硬碟資料疑似壞軌而有問題。
- 雖然用 Clonezilla Live CD 專家模式,加入 --resecure 參數,仍舊無法順利備份。
- [參考] Repairing ReiserFS file system with reiserfsck
- [參考] Dealing with ReiserFS bad blocks
- STEP 1 : 低階備份的指令
# ddrescue /dev/sda /dev/sdb
或者
# dd if=/dev/sda of=/dev/sdb conv=noerror,sync
看到一個更神奇的指令是用 SSH 把運作中的硬碟資訊 dump 到遠端
$ ssh ${deadserver} dd if=/dev/hda1 conv=noerror,sync > hda1.img
conv=noerror 會略過壞軌的錯誤,繼續複製
conv=sync 遇到壞軌時,會填入 zero 以維持資料完整性
- STEP 2 : 用 badblocks 指令確認壞軌位置,產生 badblocksfile 並重新做 fsck
# blocksize=$(debugreiserfs <device> | grep -i 'blocksize')
# badblocks -n -b $blocksize -o badblocksfile $(your_device)
# reiserfsck --fix-fixable --badblocks badblocksfile $(your_device)
Download in other formats: