Skip to contentSkip to conversation

Files getting out of sync between client/server

DISCUSSION Stefanovich 3 participants 3 messages Nov 20, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

I have a problem that when uploading files to our NFS server. The problem occurs when we overwrite a file using ftp. What happens is that on the server the file is uploaded and updated correctly, however on our nfs clients the file itself doesn't update, it actually retains the information from the previous version of the file. I have tried to remount the clients when this occurs but that doesn't fix the problem. So far the only way I have found to correct this issue is to physically reboot the client machines. Just wondering if anyone knows why this might be happening, and any idea on a fix or what I am doing wrong?

A message that is not in the archive (sent off-list or not yet received): d29a314c0711201313u4e986db3j27b3da95df2bd718-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#2 lore raw
Quoted 12 lines · Stefanovich

Hi,

I have a problem that when uploading files to our NFS server. The problem occurs when we overwrite a file using ftp. What happens is that on the server the file is uploaded and updated correctly, however on our nfs clients the file itself doesn't update, it actually retains the information from the previous version of the file. I have tried to remount the clients when this occurs but that doesn't fix the problem. So far the only way I have found to correct this issue is to physically reboot the client machines. Just wondering if anyone knows why this might be happening, and any idea on a fix or what I am doing wrong?

Does the new file keep the same inode number as the previous one? If so, then the problem is likely to be because you are keeping the file open while the other client is writing to it. That is forbidden in the close-to-open cache consistency model that most NFS clients implement.

Cheers
Trond

#3 lore raw
In reply to a message not in the archive
Quoted 12 lines · Stefanovich

Hi,

I have a problem that when uploading files to our NFS server. The problem occurs when we overwrite a file using ftp. What happens is that on the server the file is uploaded and updated correctly, however on our nfs clients the file itself doesn't update, it actually retains the information from the previous version of the file. I have tried to remount the clients when this occurs but that doesn't fix the problem. So far the only way I have found to correct this issue is to physically reboot the client machines. Just wondering if anyone knows why this might be happening, and any idea on a fix or what I am doing wrong?

the client usually caches data for about 30 seconds, IIRC, so one
would expect the potential for some sort of window, but unmounting and remounting should invalidate all of the client's caches. what happens if the client waits for "a while" -- can you see the data then? and what happens if the client touches the file and then rereads it, maybe (lame, i know)? but, regardless, i don't understand the unmount/remount thing at all.

	what kernel version(s) are you using?

	d
	.