From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 11 04:30:06 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE4CB37B401 for ; Fri, 11 Apr 2003 04:30:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82BF743FA3 for ; Fri, 11 Apr 2003 04:30:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3BBU5Up057586 for ; Fri, 11 Apr 2003 04:30:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3BBU5g1057585; Fri, 11 Apr 2003 04:30:05 -0700 (PDT) Date: Fri, 11 Apr 2003 04:30:05 -0700 (PDT) Message-Id: <200304111130.h3BBU5g1057585@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans 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 Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 11:30:06 -0000 The following reply was made to PR kern/50807; it has been noted by GNATS. From: Bruce Evans To: Shao Zhang Cc: FreeBSD-gnats-submit@freebsd.org, "" Subject: Re: kern/50807: NFS file locking as client deos not working Date: Fri, 11 Apr 2003 21:25:15 +1000 (EST) 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. Bruce