The NFSv3 documentation talks alot about the concept of "safe asynchronous writes" (last bullet of A1):


This is NOT referring to the sync/async option in the server exports file (as the async option in the exports file is NOT safe). As I understand it, safe asynchronous writes is a hybrid between the sync/async exports option. It allows for a server to reply back without flushing to stable storage immediately, but the client will not remove the write request from cache until it has received confirmation that it has been committed to stable storage (and also detects if the server looses power/reboots). I believe that this option is set on the client side, but I have not come across any documentation that shows how to do this. Any ideas?


This is simply a series of WRITE calls with COMMIT or WRITE with sync. The behavior is controlled by application write + fsync or when VM decided to recycle memory pages. The exports options async/sync can enforce server behavior, e.g. server may always sync the data even if client didn't ask for it. Check http://tools.ietf.org/html/rfc1813#section-3.3.7 and http://tools.ietf.org/html/rfc1813#section-3.3.21 for more details.

  • At the application level? Is there no way to make it a general system-wide option? What about when I just do a simple copy from a client? How do I control how it will perform the write calls? – Joe Swanson Oct 24 '13 at 22:10
  • probably, by calling sync afterword. The VM flushes pages periodically. – kofemann Oct 24 '13 at 22:16
  • So there is no way to 'automatically' have NFS perform safe asynchronous writes? There is no option that I can set to have ANY write requests from the client be performed asynchronously and have the NFS layer take care of ensuring uncommitted writes are eventually committed? The application must support the feature SPECIFICALLY? What if the application was not designed with NFS in mind? – Joe Swanson Oct 24 '13 at 23:28
  • It's other way around - NFS does what you ask for, and some times even does better. There is no difference in using nfs or local local disk. Unless you did not call fsync, there is no guarantee that data is written on disk. If your application requires this, db for example, then each fsync should trigger COMMIT. I am sure, every one expects from NFS server to write data to disk if it was asked to do so. What you can do, is to tell nfs server not to sync data to disk as long as client did not requested it. And this is by having async option in export. – kofemann Oct 25 '13 at 6:24

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.