ZFS 发送/接收始终失败并显示“输入/输出错误”

ZFS 发送/接收始终失败并显示“输入/输出错误”

我有一个启用了重复数据删除功能的 ZFS 磁盘。我已将许多其他旧硬盘上的数据复制到此 ZFS 磁盘上,最终目的是删除所有原始磁盘。不过我需要制作 ZFS 磁盘的备份副本,但我很难让它工作。

对于备份磁盘,我准备了与源磁盘大小相似的第二个磁盘,并将其插入同一台机器。它们都是 USB 外部驱动器。我在源磁盘上创建了一个快照,然后使用以下指令将其发送到备份磁盘:

zfs send srcpool/dedup@snap1 | zfs recv backuppool/dedup

但这永远无法完成(原因我记不太清楚)。为了排除一些愚蠢的配置或命令语法错误,我一直在尝试使用合子然而,这也总是会失败,每次都是在复制一两天后,就像这样:

$ sudo syncoid srcpool/dedup backuppool/dedup                                                                                                                                                       
INFO: Sending oldest full snapshot srcpool/dedup@snap1 (~ 3227.7 GB) to new target filesystem:
warning: cannot send 'srcpool/dedup@snap1': Input/output error=============================================>                                                                                         ] 46% ETA 21:18:35
1.45TiB 18:15:37 [23.2MiB/s] [=========================================================================>                                                                                         ] 46%             
cannot receive new filesystem stream: checksum mismatch or incomplete stream.
Partially received snapshot is saved.
A resuming stream can be generated on the sending system by running:
    zfs send -t 1-b12345678-b8-1234567890
CRITICAL ERROR:  zfs send  'srcpool/dedup'@'snap1' | mbuffer  -q -s 128k -m 16M 2>/dev/null | pv -p -t -e -r -b -s 3465678004032 |  zfs receive  -s -F 'backuppool/dedup' failed: 256 at /usr/sbin/syncoid line 474.

当我尝试恢复时,我立即并持续地得到以下信息:

$ sudo syncoid srcpool/dedup backuppool/dedup                                                                                                                                                   
Resuming interrupted zfs send/receive from srcpool/dedup to backuppool/dedup (~ 1738.2 GB remaining):
warning: cannot send 'srcpool/dedup@snap1': Input/output error
 264KiB 0:00:00 [ 745KiB/s] [>                                                                                                                                                                    ]  0%            
cannot receive resume stream: checksum mismatch or incomplete stream.
Partially received snapshot is saved.
A resuming stream can be generated on the sending system by running:
    zfs send -t 1-b87654321-b8-0987654321
CRITICAL ERROR:  zfs send  -t 1-b12345678-b8-1234567890 | mbuffer  -q -s 128k -m 16M 2>/dev/null | pv -p -t -e -r -b -s 1866392479776 |  zfs receive  -s -F 'backuppool/dedup' 2>&1 failed: 256 at /usr/sbin/syncoid line 559.

无论是导出/重新导入磁盘还是重新启动整个机器都无法让我通过这一点。cannot receive resume stream: checksum mismatch or incomplete stream尝试恢复时它会不断发出提示。

因此我销毁了备份池(在备份磁盘上),然后重试了几次。每次进程最终都会失败,并出现如上所示的“输入/输出错误”,大约在进程进行到一半时。

我目前正在使用 syncoid“--debug”选项再次运行该过程,但毫无疑问,它还需要一天半的时间才会再次失败并显示(希望)更多信息。

任何关于如何调试或解决这个问题的提示都将不胜感激!谢谢。

相关内容