0

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.

3
  • 1
    It's quite likely to be cached by the cifs filesystem on Ubuntu. (You can always use Wireshark to make sure.) Mar 23, 2011 at 16:24
  • @Grawity - post that as an answer.
    – mfinni
    Mar 23, 2011 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, 2011 at 14:32

1 Answer 1

0

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.

1
  • They're just text files - php, html, sql, etc
    – Redzarf
    Mar 23, 2011 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .