NFS 挂载上的备份:nfs:服务器 xxx 没有响应,超时

NFS 挂载上的备份:nfs:服务器 xxx 没有响应,超时

我的家庭服务器(Debian 11,内核 5.17.1)通过 NFS v3 从旧 Synology DiskStation DS409+(内核 2.6.32.12)挂载网络共享,并每周进行备份。

我使用rsnapshot作为备份工具,并且备份过程需要相当长的时间(几个小时),因为要备份来自多个远程服务器的文件。

约 1 小时后,NFS 问题出现在 中dmesg,并且在第一次超时后 12 分钟,内核出现错误:

(backup starts at 06:10)
[Mo Jan  2 07:02:32 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:32 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:32 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:32 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:37 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:37 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:37 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:37 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:37 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:02:37 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:05:33 2023] rpc_check_timeout: 4654 callbacks suppressed
[Mo Jan  2 07:05:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:05:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:08:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:08:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:11:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:11:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:11:33 2023] nfs: server disa not responding, timed out
[Mo Jan  2 07:14:29 2023] INFO: task rsync:63109 blocked for more than 120 seconds.
[Mo Jan  2 07:14:29 2023]       Tainted: G            E     5.17.1 #1
[Mo Jan  2 07:14:29 2023] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[Mo Jan  2 07:14:29 2023] task:rsync           state:D stack:    0 pid:63109 ppid: 63107 flags:0x00004000
[Mo Jan  2 07:14:29 2023] Call Trace:
[Mo Jan  2 07:14:29 2023]  <TASK>
[Mo Jan  2 07:14:29 2023]  __schedule+0x2e5/0x9b0
[Mo Jan  2 07:14:29 2023]  schedule+0x4e/0xc0
[Mo Jan  2 07:14:29 2023]  io_schedule+0x3b/0x60
[Mo Jan  2 07:14:29 2023]  folio_wait_bit+0x101/0x230
[Mo Jan  2 07:14:29 2023]  ? find_get_pages_range_tag+0x1a0/0x1f0
[Mo Jan  2 07:14:29 2023]  ? filemap_alloc_folio+0xb0/0xb0
[Mo Jan  2 07:14:29 2023]  folio_wait_writeback+0x28/0x80
[Mo Jan  2 07:14:29 2023]  __filemap_fdatawait_range+0x83/0xf0
[Mo Jan  2 07:14:29 2023]  filemap_write_and_wait_range+0x81/0xd0
[Mo Jan  2 07:14:29 2023]  nfs_wb_all+0x22/0x120 [nfs]
[Mo Jan  2 07:14:29 2023]  nfs_file_write+0x250/0x2a0 [nfs]
[Mo Jan  2 07:14:29 2023]  new_sync_write+0x122/0x1b0
[Mo Jan  2 07:14:29 2023]  vfs_write+0x1bb/0x2a0
[Mo Jan  2 07:14:29 2023]  ksys_write+0x5f/0xe0
[Mo Jan  2 07:14:29 2023]  do_syscall_64+0x3b/0xc0
[Mo Jan  2 07:14:29 2023]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[Mo Jan  2 07:14:29 2023] RIP: 0033:0x7fa59bae88f3
[Mo Jan  2 07:14:29 2023] RSP: 002b:00007ffcf410a958 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[Mo Jan  2 07:14:29 2023] RAX: ffffffffffffffda RBX: 000055ce885fd920 RCX: 00007fa59bae88f3
[Mo Jan  2 07:14:29 2023] RDX: 0000000000040000 RSI: 000055ce885fd920 RDI: 0000000000000004
[Mo Jan  2 07:14:29 2023] RBP: 0000000000000004 R08: 0000000000000003 R09: 0000000000000000
[Mo Jan  2 07:14:29 2023] R10: 0000000000000000 R11: 0000000000000246 R12: 000055ce87a2d329
[Mo Jan  2 07:14:29 2023] R13: 0000000000000004 R14: 0000000000000005 R15: 00007ffcf410aa28
[Mo Jan  2 07:14:29 2023]  </TASK>
[Mo Jan  2 07:14:33 2023] nfs: server disa not responding, timed out
(timeouts continue forever)

中的安装选项/etc/fstabuser,nolock,nfsvers=4,soft

“mount”列出的实际有效选项有:

rw
nosuid
nodev
noexec
relatime
vers=3
rsize=131072
wsize=131072
namlen=255
soft
nolock
proto=tcp
timeo=600  - time in deciseconds (tenths of a second)
retrans=2
sec=sys
mountaddr=192.168.3.96
mountvers=3
mountport=892
mountproto=udp
local_lock=all
addr=192.168.3.96
user

在NAS上,找不到错误日志消息。

我知道 NAS 很旧,自 2016 年以来就没有更新过(而且我不知道如何在上面安装“真正的”linux),但硬件仍然工作正常,我想继续使用它。

为什么会超时?我可以采取什么措施来防止超时?

相关内容