NFS async export option

Ben Scott dragonhawk at gmail.com
Tue Feb 20 20:08:32 CST 2007


On 2/20/07, Brendan Heading <brendanheading at clara.co.uk> wrote:
> Just wanted to check on the list, is anyone running an NFS server with
> the async option set in export file ? I've tried it with our PE2850 at
> work with some test mounts. It's speeded things up a *lot* for the NFS
> clients.

  It would.

  Normal NFS behavior (sync):

1. Program attempts write to NFS mount.
2. NFS client passes request to NFS server.
3. NFS server passes write to local filesystem.
4. Local filesystem attempts write.
5. Local filesystem tells NFS server if write succeeded or not.
6. NFS server tells NFS client if write succeeded or not.
7. NFS client tells program if write succeeded or not.

  That is safe, but obviously there is some latency involved.  With
the async export option, the behavior is:

1. Program attempts write to NFS mount.
2. NFS client passes request to NFS server.
3. NFS server tells NFS client write succeeded.
4. NFS client tells program write succeeded.
5. NFS server passes write to local filesystem.
6. Local filesystem attempts write.

  See the problem?  What happens if, in step 6, the write fails?
Maybe the filesystem is full, maybe the disk is bad, maybe permissions
have changed, etc.  But everything has already been told it worked.
If it's just, say, an append to a log file or mail spool, not too bad,
maybe.  But what if it's a lock file being created?  What if it's a
database transaction commit?  Serious bad news.  It gets worse if the
client caches the failed write and continues using the bad data.

  So just how dangerous this is depends on your application.

  There are supposedly better options with newer NFS protocol
versions, but I haven't used NFS in forever, so I can't speak to them.

  More info: http://nfs.sourceforge.net/

-- Ben



More information about the Linux-PowerEdge mailing list