When mounting /vagrant over NFS, a changed file on the host is not refresh on the guest if the size doesn't changes. Quick update/typo are not immediately reflected unless I make enough modification for the size to be different.

I've tried to set lookupcache=none but apart from making everything slower, nothing change.

I'm using OSX ML as host and Arch Linux as guest. NFS is v3 (because of OSX).

  • 1
    you need file's mtime to be changed to trigger NFS client to re-read cached blocks.
    – kofemann
    Aug 29 '13 at 6:43

This was bugging me for months, and I finally found a fix, if you're using Sublime Text (I'm on ST3). Check to see if it's using atomic saves — they were causing this issue for me.

To your Preferences.sublime-settings file, (Sublime Text > Preferences > Settings- User) add this:

    "atomic_save": false

This fixed the cached file-size NFS issue for us. Still unsure whether the root issue is in the OS X NFS daemon or the Ubuntu client (my money's on OS X).

  • I'll accept your answer as we found the same fix but I forgot to edit/answer the question. Thanks
    – hlidotbe
    Jan 7 '14 at 21:32
  • This is an important piece of info. One of our developers noticed that changing a digit in code wasn't reflected on his vagrant site (same file size). This is a pretty bad bug. Thanks for sharing this solution.
    – Bernard
    Feb 28 '14 at 1:37
  • This worked instantly. You can also add it to just your project config file under "settings" if you don't want to adjust how Sublime saves files in non-vagrant projects.
    – dcneiner
    Jun 19 '14 at 14:50
  • I suspect this would have taken me hours, days, weeks, months, or years to track down. Thank you Andy!!
    – nlh
    Sep 4 '14 at 19:00
  • 1
    You just saved me like a GAZILLION of cut content/save/refresh/paste/save/refresh... I buy you a beer. Oct 5 '14 at 11:27

VIM users

@andy has done it all, had the same problem using VIM, simply use:

:set nobackup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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