rsync-2.6.2: NFS clients confused after an rsync

Brian Childs brian at rentec.com
Tue May 11 17:48:33 GMT 2004


On Tue, May 11, 2004 at 10:01:48AM -0700, Wayne Davison wrote:
> On Thu, May 06, 2004 at 06:21:55PM -0400, Brian Childs wrote:
> > rm -f /tmp/testpath/* $HOME/testpath/*
> > 
> > #Prime it
> > echo some data > /tmp/testpath/testfile
> > sleep 1
> > rsync -a /tmp/testpath/ $HOME/testpath/
> > ssh $otherbox ls -li $HOME/testpath
> > 
> > #Break it
> > echo additional data >> /tmp/testpath/testfile
> > sleep 1
> > rsync -a -b /tmp/testpath/ $HOME/testpath/
> > ssh $otherbox ls -li $HOME/testpath
> 
> Do you actually need to use the -b option for the breakage to happen?

Yes.  Without the -b, it doesn't happen.

> In the output you show, not only is the new testfile~ not yet found,
> but the extra data in testfile is not seen (including showing the wrong
> inode).  Since rsync isn't actually updating any files in-place, the
> file gets a new inode while keeping the directory time unchanged, so
> that may be enough to confuse NFS.

I believe that's exactly what's happening.  rsync is in effect spoofing
the nfs clients dentry cache.

> I had been considering making the preservation of directory times an
> optional occurance with rsync.  The appended patch implements this.
> Comments?

I'll try it

Thanks,
Brian


More information about the rsync mailing list