我用备份了故障的硬盘ddrescue
。我使用的命令是
# ddrescue -vv -d -J /dev/sda /mnt/rescue/winxp.img winxp.map
该程序完成了大约60个错误。我只想重试失败的块。我在手册页中找到了此部分:
-m file --domain-mapfile=file Restrict the rescue domain to the blocks marked as finished in the mapfile file. This is useful for merging partially recovered images of backups, or if the destination drive fails during the rescue. Use '-' as file to read the domain mapfile from standard input. Specialized tools like ddrutility or partclone can produce a domain mapfile listing all the used blocks in a partition, making the rescue more efficient. -M --retrim Mark all failed blocks inside the rescue domain as non-trimmed before beginning the rescue. The effect is similar to '--retry-passes=1', but the bad sectors are tried in a different order, making perhaps possible to rescue some of them.
我发出的下一个命令是
# ddrescue -vv -d -M -m winxp.map /dev/sda /mnt/rescue/winxp.img winxp.2.map
我认为这只会重试以前失败的块。但是,它似乎又从整个过程开始,并试图抢救整个磁盘。
有没有办法只重试失败的块,并在成功后将它们保存在先前的映像中?
您每次都需要使用相同的地图文件-在这里它记录了尝试过的区域以及它们是成功还是失败。
通常,您无需在运行之间更改命令,只需重新发出命令即可使它重新尝试失败的区域(再次)。
使用-m
will(如手册所述)“将救援域限制为在mapfile文件中标记为已完成的块。 ”-即:仅尝试读取成功的块。
同样,如手册所述,与其他实用程序一起使用时,这很有用,可以减少读取的数据量,并有可能减少运行时间和遇到的错误数量。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句