[comp.mail.elm] Lost Mail with NFS mounts

phil@wubios.wustl.edu (J. Philip Miller) (11/21/89)

The following  was posted on sun-nets mailing list and explains another
mechanism by which elm can loose mail since it rewrites the spool as well.
-phil


Date: Tue, 21 Nov 89 08:43:57 EST
From: pbg@cs.brown.edu
Message-Id: <8911211343.AA04067@bob.cs.brown.edu>
To: sun-nets@umiacs.umd.edu
Subject: Re: losing mail
Sender: Sun-Nets-request@umiacs.UMD.EDU
Status: OR


A good summary of one aspect of the problem was recently posted to the
sun-managers mailing list.  I submitted the bug to Sun but someone
else beat me to posting it.  Here's the note:

From: Wolfgang Wetz <cgch!wwtz@relay.eu.net>
Newsgroups: brown.sunmanagers
Subject: I lost some of my email (NFS mounted /usr/spool/mail)
Date: 8 Nov 89 18:10:45 GMT


I'm running SunOS 4.0.3 on Sun-3s.

When I upgraded to SunOS 4.0 I found the NFS mounted /usr/spool/mail
an interesting feature and therefore configured our (some 40) work-
stations this way.

Just by chance I noticed, that I lost some of my mail. Since this
is a very nasty problem, some of you might be interested in the
following response from Sun:

--- begin included text ---
About a month ago you reported a problem with your NFS-mounted mail
spool directory.

Right now the problem is on my desk. I have done some investigation
and realized that this is a known problem which has been filed as
a bug by the Brown University. The bug-id is 1027853.

Here are some relevant parts of it:

Description:
Customer logs into a mailclient and starts up mail. In another
window he logs into the mailbox server and starts up biff. In this
window biff indicates that a new message has been delivered to
his mailbox, so he quits mail and starts it up again. When mail
starts up again there is no new mail, only the mail that was
saved back to his mailbox during the quit.

Work around:
mount /var/spool/mail with the smallest possible attribute cacheing
time possible. Currently this is actimeo=1.

Public Summary:
When /var/spool/mail is NFS mounted there is a possiblility of
overwriting new mail messages when quitting mail. Mail attempts
to determine if new mail has arrived when the user quits mail.
It performs a stat to make this determination. Since the file
is NFS mounted the stat will return information from the buffer
cache rather than from the mailbox server if the buffer cache
has not timed out. If new mail has been delivered to the mailbox
server before the cache has timed out mail's determination
that no new mail has been delivered will be incorrect. It will
then overwrite the new mail message with mail that needs to be
restored to the mailbox. The user will never see the new mail.
A workaround is to make the NFS buffer cahce timeout period as
short as possible. Therefore, /var/spool/mail should be mounted
with the actimeo=1 option.

--- end of included text ---

This explaination only makes sense in the context of mail programs
which write back to the spool directory (like /usr/ucb/mail).
Programs like emacs don't do that, so any mail loss from those
programs is still a mystery (and in fact we don't see any other loss
here).

					      --Peter

------------------------------------------    --------------------------------
Peter Baer Galvin       		      (401) 863-7623
Systems Manager, Brown Univ. Comp. Sci.       pbg@cs.brown.edu
Box 1910 (115 Waterman Street)                uunet!brunix!pbg
Providence, RI 02912			      pbg@browncs.bitnet


-- 
     J. Philip Miller, Professor, Division of Biostatistics, Box 8067
	 Washington University Medical School, St. Louis MO 63110
phil@wubios.WUstl.edu - Internet  (314) 362-3617   phil@wubios.wustl - bitnet
uunet!wucs1!wubios!phil - UUCP              C90562JM@WUVMD - alternate bitnet