Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a fileshare on Windows 7 that I'm accessing from a linux (ubuntu lucid) virtual machine running in VirtualBox.

When I change a file in windows, then don't access it for a while (an hour or two or more) in the linux filesystem, it either uses the old/unchanged version of the file, or it uses a truncated or corrupted version of the file.

I'm using fstab and cifs, and haven't had any other problems.

Running mount -a doesn't update the caching - I'm not really sure whether it's caching at the windows side or linux.

The two actions that update to the newer version of a file are: - restarting the linux virtual machine - resaving the file with a different filesize

Is there a way to turn off or improve the caching?

I had a look through the Win7->folder->Sharing settings, and couldn't see anything useful there.

share|improve this question
1  
It's quite likely to be cached by the cifs filesystem on Ubuntu. (You can always use Wireshark to make sure.) –  grawity Mar 23 '11 at 16:24
    
@Grawity - post that as an answer. –  mfinni Mar 23 '11 at 21:20
    
So I looked at the cifs caching more, and you can turn it off with the forcedirectio option: link After a day of use it seems like it's working. –  Redzarf Mar 25 '11 at 14:32

1 Answer 1

Windows filesharing probably isn't doing this. What format is the file? The application on one side or the other may be mangling the file when it's changed by one.

share|improve this answer
    
They're just text files - php, html, sql, etc –  Redzarf Mar 23 '11 at 17:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.