From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 19 05:50:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D58D1065670 for ; Sat, 19 Jul 2008 05:50:50 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id B856D8FC12 for ; Sat, 19 Jul 2008 05:50:49 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by postfix1-g20.free.fr (Postfix) with ESMTP id F31D82867E93 for ; Sat, 19 Jul 2008 07:24:18 +0200 (CEST) Received: from smtp4-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp4-g19.free.fr (Postfix) with ESMTP id AC53E3EA0BC for ; Sat, 19 Jul 2008 07:24:16 +0200 (CEST) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp4-g19.free.fr (Postfix) with ESMTP id 66D2C3EA0AD for ; Sat, 19 Jul 2008 07:24:16 +0200 (CEST) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id m6J5OEfe011470 for ; Sat, 19 Jul 2008 07:24:15 +0200 (CEST) From: Thierry Herbelot To: freebsd-hackers@freebsd.org Date: Sat, 19 Jul 2008 07:23:46 +0200 User-Agent: KMail/1.9.7 X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807190723.47208.thierry.herbelot@laposte.net> Subject: NFS locking from a qemu machine ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2008 05:50:50 -0000 Hello, I'm trying to use NFS locking from an NFS client running in a qemu virtual PC to an NFS server running on the host machine, but with no success so far : configuration for the host PC (server) : operating system : FreeBSD 7.0-Stable % cat /etc/exports /shared/ 127.0.0.1 and in /etc/rc.conf : nfs_server_enable="YES" weak_mountd_authentication="YES" # Allow non-root mount requests to be served. rpcbind_enable="YES" # Run the portmapper service (YES/NO). rpc_lockd_enable="YES" # Run NFS rpc.lockd needed for client/server. rpc_statd_enable="YES" # Run NFS rpc.statd needed for client/server. configuration for the qemu machine (client) : operating system : FreeBSD 7.0-Stable in /etc/fstab : 10.0.2.2:/shared /shared nfs rw 0 0 in /etc/rc.conf : nfs_client_enable="YES" # This host is an NFS client (or NO). rpcbind_enable="YES" # Run the portmapper service (YES/NO). rpc_lockd_enable="YES" # Run NFS rpc.lockd needed for client/server. rpc_statd_enable="YES" # Run NFS rpc.statd needed for client/server. I'm using tools/regression/file/flock to check the correct file locking : $ ./flock ../../shared and the client machine seems locked the ethernet traffic between the client and the server when the client is blocked is the following : (the "tunnel" port is the one used by the lockmanager according to rpcinfo) 16:54:47.907919 IP (tos 0x0, ttl 64, id 48249, offset 0, flags [none], proto UDP (17), length 84) localhost.53807 > localhost.sunrpc: [udp sum ok] UDP, length 56 16:54:47.908030 IP (tos 0x0, ttl 64, id 48250, offset 0, flags [none], proto UDP (17), length 56) localhost.sunrpc > localhost.53807: [udp sum ok] UDP, length 28 16:54:47.909791 IP (tos 0x0, ttl 64, id 48251, offset 0, flags [none], proto UDP (17), length 204) localhost.61180 > localhost.tunnel: [udp sum ok] UDP, length 176 16:54:47.909834 IP (tos 0x0, ttl 64, id 48252, offset 0, flags [none], proto UDP (17), length 92) localhost.790 > localhost.sunrpc: [udp sum ok] UDP, length 64 16:54:47.909932 IP (tos 0x0, ttl 64, id 48253, offset 0, flags [none], proto UDP (17), length 72) localhost.sunrpc > localhost.790: [udp sum ok] UDP, length 44 16:54:47.909956 IP (tos 0x0, ttl 64, id 48254, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:55:27.490768 IP (tos 0x0, ttl 64, id 48255, offset 0, flags [none], proto UDP (17), length 204) localhost.61180 > localhost.tunnel: [udp sum ok] UDP, length 176 16:55:27.490814 IP (tos 0x0, ttl 64, id 48256, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:56:07.069067 IP (tos 0x0, ttl 64, id 48257, offset 0, flags [none], proto UDP (17), length 204) localhost.61180 > localhost.tunnel: [udp sum ok] UDP, length 176 16:56:07.069110 IP (tos 0x0, ttl 64, id 48258, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:56:46.683998 IP (tos 0x0, ttl 64, id 48276, offset 0, flags [none], proto UDP (17), length 204) localhost.61180 > localhost.tunnel: [udp sum ok] UDP, length 176 16:56:46.684042 IP (tos 0x0, ttl 64, id 48277, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:57:26.375646 IP (tos 0x0, ttl 64, id 48281, offset 0, flags [none], proto UDP (17), length 84) localhost.50653 > localhost.sunrpc: [udp sum ok] UDP, length 56 16:57:26.375758 IP (tos 0x0, ttl 64, id 48282, offset 0, flags [none], proto UDP (17), length 56) localhost.sunrpc > localhost.50653: [udp sum ok] UDP, length 28 16:57:26.376715 IP (tos 0x0, ttl 64, id 48283, offset 0, flags [none], proto UDP (17), length 204) localhost.63595 > localhost.tunnel: [udp sum ok] UDP, length 176 16:57:26.376755 IP (tos 0x0, ttl 64, id 48284, offset 0, flags [none], proto UDP (17), length 92) localhost.790 > localhost.sunrpc: [udp sum ok] UDP, length 64 16:57:26.376851 IP (tos 0x0, ttl 64, id 48285, offset 0, flags [none], proto UDP (17), length 72) localhost.sunrpc > localhost.790: [udp sum ok] UDP, length 44 16:57:26.376874 IP (tos 0x0, ttl 64, id 48286, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:58:06.271603 IP (tos 0x0, ttl 64, id 48297, offset 0, flags [none], proto UDP (17), length 204) localhost.63595 > localhost.tunnel: [udp sum ok] UDP, length 176 16:58:06.271647 IP (tos 0x0, ttl 64, id 48298, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:58:46.178361 IP (tos 0x0, ttl 64, id 48301, offset 0, flags [none], proto UDP (17), length 204) localhost.63595 > localhost.tunnel: [udp sum ok] UDP, length 176 16:58:46.178409 IP (tos 0x0, ttl 64, id 48302, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 16:59:26.115517 IP (tos 0x0, ttl 64, id 48303, offset 0, flags [none], proto UDP (17), length 204) localhost.63595 > localhost.tunnel: [udp sum ok] UDP, length 176 16:59:26.115563 IP (tos 0x0, ttl 64, id 48304, offset 0, flags [none], proto UDP (17), length 140) localhost.790 > localhost.tunnel: [udp sum ok] UDP, length 112 any idea about bad configuration ? thanks in advance TfH