rsync和cp到nfs在执行后挂起

时间:2018-02-01 20:25:26

标签: linux debian nfs

我的局域网上有一个NAS,我可以毫无问题地访问它。它安装在我的机器上如下: mount -t nfs 192.168.2.9:/nfs/Public /mnt/nfs/nas/Public/

当我执行以下命令rsync --progress video.mkv /mnt/nfs/nas/Public时,rsync在几秒钟内达到100%,然后挂起几分钟。 cpmv也是如此。它没有显示任何错误或任何错误,只是挂起似乎没什么。

我该如何解决这个问题,以便一旦完成工作,这个过程就不会挂起这么久?

编辑: 一些额外的信息。我尝试用strace执行它,这就是我在过程结束时得到的结果:

write(4, "\4\200\0\7\0\324\205\362\377Q`\277\343gzn\351\7\326\312\3368\1\242\362\203Y\336(\264\f\n"..., 32776) = 32776
    576,142,724 100%  227.98MB/s    0:00:02 (xfr#1, to-chk=0/1)
) = 65
munmap(0x7f70c300f000, 266240)          = 0
close(3)                                = 0
select(6, [5], [4], [5], {tv_sec=60, tv_usec=0}) = 1 (out [4], left {tv_sec=59, tv_usec=999999})
write(4, "\235\275\0\7\215\177\244;\345!\375 \212!\243+\357q\32?\31D\34\3749\251\376\355\254Y\254\304"..., 48545) = 48545
select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 0 (Timeout)
select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 0 (Timeout)
select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 0 (Timeout)
select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 1 (in [5], left {tv_sec=30, tv_usec=672979})
read(5, "\3\0\0\7\0\0\0", 32768)        = 7
select(6, [5], [4], [5], {tv_sec=60, tv_usec=0}) = 1 (out [4], left {tv_sec=59, tv_usec=999997})
write(4, "\2\0\0\7\0\0", 6)             = 6
select(6, [5], [4], [5], {tv_sec=60, tv_usec=0}) = 1 (out [4], left {tv_sec=59, tv_usec=999997})
write(4, "\1\0\0\7\0", 5)               = 5
select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 1 (in [5], left {tv_sec=59, tv_usec=999998})
read(5, "\1\0\0\7\0", 32768)            = 5
wait4(5734, 0x7fff0c840524, WNOHANG, NULL) = 0
nanosleep({tv_sec=0, tv_nsec=20000000}, NULL) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5734, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 5734
wait4(-1, 0x7fff0c83fe14, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]})                 = -1 EINTR (Interrupted system call)
wait4(5734, 0x7fff0c840524, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigaction(SIGUSR1, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f70c3105030}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f70c3105030}, NULL, 8) = 0
wait4(5734, 0x7fff0c840504, WNOHANG, NULL) = -1 ECHILD (No child processes)
exit_group(0)                           = ?
+++ exited with 0 +++

当它开始挂起时,它会卡在第一个select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 0(最初没有括号之间的超时)

0 个答案:

没有答案