如何更改当前复制位置或跳过 ddrescue 中的区域

如何更改当前复制位置或跳过 ddrescue 中的区域

我目前正在尝试使用 ddrescue 从出现故障的 3TB WD Red 驱动器中恢复数据。

两周后,我得到了大约 1 TB,但随后读取速度增加到每秒几千字节,现在需要数年时间才能完成。我注意到,关闭和打开驱动器电源会在几秒钟内将读取速度提高到每秒几百/千字节,然后再次下降到超慢。

我猜想盘片上有一些灰尘粘在磁盘头上,当磁头滑到停车位置时会被清除。
ddrecsue 当前运行如下:

ddrescue -f -n -b 4096 /dev/sda /dev/sdb /media/usbstick/rescue.log

我现在想跳过这个区域并继续其他地方,比如说 1500GB,但不知道该怎么做。有参数--input-position=bytes,但文档说:

infile 中救援域的起始位置(以字节为单位)。默认为 0。这不是 ddrescue 开始复制的点。

还有--skip-size=[initial][,max],但似乎是在坏扇区后跳过的大小,这不是我想要的。

有什么想法如何实现这一目标?

答案1

完整的文档ddrescue(请参阅 参考资料info ddrescue)涵盖了这个示例:

示例 3:将整个驱动器 /dev/sda 拯救到 /dev/sdb 时,/dev/sda 在位置 12345678 处冻结。

ddrescue -f /dev/sda /dev/sdb mapfile       <-- /dev/sda freezes here
  (restart /dev/sda or reboot computer)
  (restart copy at a safe distance from the troubled sector)
ddrescue -f -i 12350000 /dev/sda /dev/sdb mapfile
  (then copy backwards down to the troubled sector)
ddrescue -f -R /dev/sda /dev/sdb mapfile

所以选项-i确实可以用来跳过某个区域。警告

这不是 ddrescue 开始复制的点。

与文档还解释的其他选项相关:

-i bytes
--input-position=bytes
    Starting position of the rescue domain in infile, in bytes. Defaults to 0. This is not the point from which ddrescue starts copying. (For example, if you pass the option '--reverse' to ddrescue, it starts copying from the end of the rescue domain). In fill mode it refers to a position in the infile of the original rescue run. See the chapter Fill mode (see Fill mode) for details.

因此,只要不使用-Ror -F,就可以用作-i偏移量来跳过某个字节区域。

相关内容