Words by Pavel Georgiev [Mon, Nov 26, 2007 at 05:35:42PM +0200]:
Hi,
I have postfix + courier running on two servers with mailboxes shared on a
third server shared over nfs.
When I access a mailbox over imap, I see it trying to rename files from ./new
to ./cur, which is OK. The problem is that the syscall returns 0 (which is
success) but the file is still in ./new, so the when imapd list the dir again
it still sees the same files and tries to rename them. This loops continues
for long enough to make the imap client give up. See the attached strace log
of the imapd process with the loop.
When I try to `ls` some of the files that it tries to rename, I see that there
are still in ./new, which is odd as rename seems to succeed. However if I do
the same `ls` on the nfs server where the mailboxes are, I see that it the
files are already renamed to ./cur.
To eliminate nfs race conditions I`ve turned the second mail server off, so
there is only one nfs client accessing the mailboxes. The nfs server is a
linux box as well, running Ubuntu 7.04, the underlying fs is reiserfs and it
runs on top of drbd (if this makes any differance).
I guess this is some nfs issue, I really hope someone had the same problem and
probably a solution for this.
Certainly a NFS cache issue.
Cache flushing is probably not taken care of on the application.
There's an interesting thread on it here:
http://sourceforge.net/mailarchive/forum.php?thread_name=1195258291.6039.189.camel%40hurina&forum_name=nfs
and more here:
http://irccrew.org/~cras/nfs-coding-howto.html
--
Jose Celestino
----------------------------------------------------------------
http://www.msversus.org/ ; http://techp.org/petition/show/1
http://www.vinc17.org/noswpat.en.html
----------------------------------------------------------------
"Common sense is not so common." — Voltaire (1694—1778)