Possible bug: File changed as we read it
Paul.Green at stratus.com
Wed Jul 31 14:04:02 GMT 2002
Bert Buckley [mailto:bbuckley at trilan.com] writes (edited for brevity):
> I do daily dumps from a Linux box of the Windows machines on
> my network. (Kernel 2.4.7-10, Redhat 7.2., samba-2.2.1a-4 )
> These are done overnight.
> I mount the appropriate shared directories as a samba
> filesystem and use tar to incrementally dump all recently
> changed files (using their time stamp). [snip]
> I now get a number of errors of the form:
> tar: ./Toxocara/Restore/Toxocara.mdb: file changed as
> we read it
> The files that generate these errors are completely static.
> There are 4 to 6 of them. It seems always to be the same files.
> Their timestamps look perfectly normal. There is nothing that I
> can find that is altering these files. Their timestamps have
> not changed.
I have seen tar do this when the number of bytes returned by reading the
file does not agree with the size return by stat(). You can verify this by
writing a small test program that stats the file and then reads until EOF
counting up the bytes read. If this small test case fails, then tar is
Are these local files or remotely-mounted (NFS) files? Are they sparse
files? Yeah, these things should not matter, but... Oh, and are the
copies created by tar the same as the originals or not? You didn't say.
(And then the completely generic answer...) Your version of Samba is rather
old. You might try the current version (2.2.5).
Hope this sheds a small amount of light.
More information about the samba-technical