From owner-freebsd-bugs@FreeBSD.ORG Sun Apr 13 17:27:38 2003 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E53D037B401 for ; Sun, 13 Apr 2003 17:27:37 -0700 (PDT) Received: from osprey.activesky.com.au (osprey.activesky.com.au [202.92.123.99]) by mx1.FreeBSD.org (Postfix) with SMTP id 972C043F3F for ; Sun, 13 Apr 2003 17:27:35 -0700 (PDT) (envelope-from shaoz@activesky.com) Received: (qmail 10878 invoked by uid 10018); 14 Apr 2003 00:27:31 -0000 Received: from shaoz@activesky.com by osprey.activesky.com.au by uid 0 with qmail-scanner-1.16 (uvscan: v4.1.60/v4247. Clear:. Processed in 0.420387 secs); 14 Apr 2003 00:27:31 -0000 X-Qmail-Scanner-Mail-From: shaoz@activesky.com via osprey.activesky.com.au X-Qmail-Scanner: 1.16 (Clear:. Processed in 0.420387 secs) Received: from unknown (HELO shaoz.activesky.com.au) (203.185.212.194) by osprey.activesky.com.au with SMTP; 14 Apr 2003 00:27:30 -0000 Received: from shaoz.activesky.com.au (localhost [127.0.0.1]) h3E0REQX038795; Mon, 14 Apr 2003 10:27:14 +1000 (EST) (envelope-from shaoz@activesky.com) Received: (from shaoz@localhost) by shaoz.activesky.com.au (8.12.6/8.12.6/Submit) id h3E0RBOn038794; Mon, 14 Apr 2003 10:27:11 +1000 (EST) (envelope-from shaoz@activesky.com) X-Authentication-Warning: shaoz.activesky.com.au: shaoz set sender to shaoz@activesky.com using -f To: Bruce Evans X-Face: $>)r}og6b.JbA$y%X0q?2"p4u&N/WI_fF>^HU'dC+Ze8t]K-SgKfn%U (Bruce Evans's message of "Fri, 11 Apr 2003 21:25:15 +1000 (EST)") References: <200304110718.h3B7IIbJ027995@shaoz.activesky.com.au> <20030411210755.G3888@gamplex.bde.org> From: Shao Zhang Date: Mon, 14 Apr 2003 10:27:11 +1000 Message-ID: User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-bugs@freebsd.org cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/50807: NFS file locking as client deos not working X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 00:27:38 -0000 On [Fri, 11 Apr 2003 21:25:15 +1000 (EST)], Bruce Evans wrote: > On Fri, 11 Apr 2003, Shao Zhang wrote: > >> >Description: >> When running the system as an NFS client, file locking does not work at >> all. The call to fcntl(id, F_SETLK, ...) returns errno 45. The nfs server used >> is a Redhat Linux 7, with kernel 2.4.2. I have verified that it works fine in >> both 4.5-RELEASE and 4.6-RELEASE. I have the following entries in my rc.conf: >> >> nfs_client_enable="YES" # This host is an NFS client (or NO). >> nfs_access_cache="4" # Client cache timeout in seconds >> nfs_server_enable="NO" # This host is an NFS server (or NO). >> nfs_server_flags="-u -t -n 4" # Flags to nfsd (if enabled). >> nfs_privport="YES" # Provide NFS only on secure port (or NO). >> nfs_bufpackets="DEFAULT" # bufspace (in packets) for client (or DEFAULT) > > At least for a -current server and client, one or both rpc.lockd and > rpc.statd enabled here on one or both of the client and server. IIRC, > enabling both on both works but may be more than necessary. rc.conf.5 > is very unclear on the exact servers required. mount_nfs.8 gives more > details in connection with how to not use these servers (-L/nolockd flag) > but is also unclear. > > RELENG_4 fakes nfs locking so that lock requests succeed but don't actually > work. "mount -t nfs -onolockd ..." gives the same fake locking as in > RELENG_4. My understanding is that you only need to enable lockd and statd for the server. According to man rc.conf: rpc_lockd_enable (bool) If set to ``YES'' and also an NFS server, run rpc.lockd(8) at boot time. rpc_statd_enable (bool) If set to ``YES'' and also an NFS server, run rpc.statd(8) at boot time. The NFS server I am using here is a linux box with 2.4.2 which has a kernel mode lockd and rpc.statd is running as well. I have tried to enable both options on my freebsd box as a client, and now the bogofilter program actually hangs there. Regards, Shao.