最近出了一系列故障,是 NFS 不支持 O_APPEND 而引起的,见 http://linux.die.net/man/2/open
即使是本地文件系统的append原子性,也有人提到还存在一个 PIPE_BUF 上限的问题 http://stackoverflow.com/questions/1154446/is-file-append-atomic-in-unix
随便一搜关于 NFS 就有好多抱怨:但看到约一年前的一个见解是:A perfect NFSv4 implemenation, configured properly, provides a very useful set of guarantees. However, the quality of NFSv4 implementations has been an issue. Especially, Linux's NFSv4 server implementation has historically had many flaws. Plus, people often mount NFS using the NFSv3 protocol instead of NFSv4, and/or reduce the safety guarantees with the goal of improving performance.
This is why almost everybody recommends NOT to use NFS to store anything critical. For example, SQLite's documentation states very clearly that you shouldn't store SQLite databases on NFS. And, this is why Oracle supports NFS (a) only with a list of specific NFS server implementations (mostly NetApp), and (b) using its own built in NFS client implementation (not the operating system's transparent NFS client).
最新评论