[clug] nfs issue

Eyal Lebedinsky eyal at eyal.emu.id.au
Mon May 20 13:12:32 UTC 2019


On 20/5/19 9:06 pm, Paul Wayper via linux wrote:
> On 5/20/19 7:20 PM, Eyal Lebedinsky via linux wrote:
>> The source machine is both the nfs server and the local ntp server.
>>
>> But even if time is slightly off, why would a file be missing at times?
> 
> Maybe rsync thinks the file systems you're copying between are both local?
> 
> I know that rsync does things differently if it's not talking to a remote
> rsync daemon (for either source or destination).  If I recall correctly it
> does entire file copies instead of incremental rewrites, on the principle that
> it's going to cost more to read the source and destination and write a new
> file than it is to simply copy the changed file over the destination.
> 
> This is pure speculation here, but I'm wondering if there's then some weird
> interaction between NFS's creation and locking semantics and rsync's view of
> the file system it's copying from.  I can't think what those might be.
> 
> So it might be worth not doing an NFS mount but doing the rsync via ssh.
> 
> I've also found --delete-after to be a bit better than --delete, although I
> think that was mainly with the --fuzzy option.
> 
> Hope this helps,

Interesting, and I will play with the different delete options. However, the problem
of a file disappearing is unrelated to rsync, I can see it with a simple 'ls -l'
in the (nfs mounted) directory. Here is a sample run where the disappearing file
is 'setup.c':

$ while true ; do echo "`date` `ls -l|grep setup\.c`" ; sleep 1s ; done
Thu Apr  4 18:54:15 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:16 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:17 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:18 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:19 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:20 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:21 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:22 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:23 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:24 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:25 AEDT 2019 -rw-r--r-- 1 500 500  3098 Jun 23  2016 setup.c
Thu Apr  4 18:54:26 AEDT 2019
Thu Apr  4 18:54:27 AEDT 2019
Thu Apr  4 18:54:28 AEDT 2019
Thu Apr  4 18:54:29 AEDT 2019
Thu Apr  4 18:54:30 AEDT 2019
Thu Apr  4 18:54:31 AEDT 2019
Thu Apr  4 18:54:32 AEDT 2019
## the files shows up again later...

> Paul

-- 
Eyal at Home (eyal at eyal.emu.id.au)



More information about the linux mailing list