rsync to nfs hangs

If none of the more specific forums is the right place to ask

rsync to nfs hangs

Postby Migwel » 2018-02-01 19:48

Hello,
I have a NAS on my LAN that I can access without any issue. It's mounted on my machine as follows:
Code: Select all
mount -t nfs 192.168.2.9:/nfs/Public /mnt/nfs/nas/Public/
.

When I execute the following command
Code: Select all
rsync --progress video.mkv /mnt/nfs/nas/Public
rsync reaches 100% in a few seconds then hangs for a few minutes. The same happens with cp or mv. It doesn't display any error or anything, it simply hangs doing seemingly nothing.

Does someone know how I can solve this so that the process doesn't hang for so long once it's done with its work? I've tried several mount options but nothing really helped.

Thanks a lot in advance!
Migwel
 
Posts: 5
Joined: 2017-06-15 18:45

Re: rsync to nfs hangs

Postby Migwel » 2018-02-01 19:51

Some extra information. I've tried executing it with strace and this is what I get at the end of the process:
Code: Select all
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 +++


When it starts hanging, it is stuck at the first select(6, [5], [], [5], {tv_sec=60, tv_usec=0}) = 0 (initially without the Timeout between brackets)
Migwel
 
Posts: 5
Joined: 2017-06-15 18:45

Re: rsync to nfs hangs

Postby acewiza » 2018-02-01 20:17

Try adding a fore-slash to the end of your command line.
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.
User avatar
acewiza
 
Posts: 358
Joined: 2013-05-28 12:38
Location: Out West


Return to General Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable