From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 12:54:33 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ECD237B401 for ; Tue, 29 Apr 2003 12:54:33 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B20743F93 for ; Tue, 29 Apr 2003 12:54:32 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h3TJsVNm076705; Tue, 29 Apr 2003 14:54:31 -0500 (CDT) (envelope-from dan) Date: Tue, 29 Apr 2003 14:54:31 -0500 From: Dan Nelson To: omestre@freeshell.org Message-ID: <20030429195431.GA22259@dan.emsphone.com> References: <20030429160500.E514F107C1@ws-tor-0004.procergs> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030429160500.E514F107C1@ws-tor-0004.procergs> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: rpc.lockd X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2003 19:54:33 -0000 In the last episode (Apr 29), omestre@freeshell.org said: > I'm having problems with rpc.lockd (nfs locks)... > Now, i guess that i know "where is" the problem. I have one Linux box > as my NFS server to Linux and FreBSD 4.x machines, working fine. > I have some FreeBSD 5.0 machines that do not work the locks. Looking at > the log in the Linux server, i have saw these messages: > kernel: lockd: bad cookie size 16 (only cookies under 8 bytes are supported.) > Without 5.0 clients, these messages go out! So, how can i make the rpc.lockd > work like 4.x series? > The 5.0 lock protocol, i guess, is incompatible with linux ( kernel 2.4.20). > Thanks. FreeBSD 4.* didn't do locking at all; rpc.lockd simply accepted all requests but never tried to lock the remote sfile. FreeBSD 5's rpc.lockd does send lock requests, but the Linux kernel apparently cannot handle the 16-byte request. If you were happy with FreeBSD 4's behaviour, try just not running rpc.lockd on your FreeBSD 5 systems. If you really need locking, you can probably cut FreeBSD's cookie size down to 8 bytes by removing the pid_start element from struct lockd_msg_ident in /sys/nfsclient/nfs_lock.h (and removing the code that sets it in nfs_lock.c), and rebuilding world and the kernel. A better solution would be to submit a bugreport to your Linux vendor and have them fix it on their end. -- Dan Nelson dnelson@allantgroup.com