Subject: mail locking problem w/solaris server
To: None <netbsd-help@netbsd.org>
From: Keith Moore <moore@cs.utk.edu>
List: netbsd-help
Date: 11/02/1999 14:02:29
mail server is Solaris 2.7.  client is NetBSD-i386 1.3.3.

/var/mail is nfs mounted from the server, read/write, by amd

the permissions of /var/mail on that server are 3777 (drwxrwsrwt,
owner root, group mail).  

I've also tried mode 1777; results are the same.

*everything* (on both the server and client) that touches mailboxes
is configured to use user.lock style locking.

'inc' (from nmh) fails on NetBSD 1.3.3.  a ktrace/kdump shows
that the problem is that it cannot create a tmp file in /var/mail
(if the create succeeded, it would then link it to /var/mail/moore.lock) 

sure enough, a 'cp /dev/null /var/mail/tmp.$$' also fails, with the msg:
cp: /var/mail/tmp.28864: Inappropriate file type or format
(same errno that inc is getting)

I tried mounting the partition by hand  with 'mount cs:/var/mail /mnt'
and doing 'cp /dev/null /mnt/tmp.$$'  no difference.

I then tried mounting the partition using NFS v2 using
'mount_nfs -2 cs:/var/mail /mnt'
now I can create a tmp file in /mnt.

but if I try to get amd to mount it using NFSv2, it fails:
neither addopts:=nfsv2 nor addopts:=vers=2  has the desired effect.
running tcpdump shows that amd does indeed mount the partition using 
version 2 rpc calls, but then at some point the client switches to 
NFSv3 protocol.

has anyone seen this problem before?  is there a workaround?

(other than to ditch solaris...believe me, I'd like to...)

has it been fixed in later NetBSD versions, or 
should I file bug reports for kernel NFS and/or amd?

Keith