Re: NFS causes mail loss and other nasties

Thierry Danis (danis@mail.dotcom.fr)
Sun, 31 Jan 1999 23:41:16 +0100 (MET)


>
> In article <cistron.19990131003318.A1537@complete.org>,
> John Goerzen <jgoerzen@complete.org> wrote:
> >Now, here's what's interesting. I can do a ls -l of the mailbox, and it
> >will show up with a certain size on the server. On the client, it will show
> >up with a certain *SMALLER* size! (This would be the period of time between
> >when the new mail arrives and the client is aware of it).
>
> *Always* mount your mail spool with the "noac" option (No Attribute CAching)
>
> Mike.

In fact, I have seen the same behaviour with elm ME+ and the
new 2.2.0 pre7 and final kernel : upon resynchronisation of my
folder, it disappears before beeing renamed, thus putting
elm in a bad state.
I am using procmail to redirect the mail messages into a
folder located in my home directory. The NFS server is
a Solaris 2.5.1. I had to recompile elm to make it work
with the NFS locking mechanism of the new kernels.

I tried to follow the operations performed by elm on a
resynchronisation :

[... some stuff where a "tmp mailbox" is created from the ....]
[... original "mailbox" file (located in my home dir ....]

then :
1) fopen("mailbox")
2) unlink("mailbox")
3) ftruncate("mailbox") : the mailbox file is still there
4) fread("tmp mailbox", buffer) && fwrite("mailbox", buffer)
[ie. recopy tmp mailbox" in "mailbox"]

Up to here, "mailbox" is still present

5) fflush("mailbox")
6) a few seconds later, "mailbox" disappears !
7) elm completely screwed up.

The same version of elm ME+ has been compiled on every OS'es
we are working with (Solaris, SunOS, Irix, HP-UX, FreeBSD,
Linux 2.0.36, ...) and it works in that configuration.

-- 
	Thierry Danis

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/