From risky@junior.mephi.ru  Thu Jun  3 13:05:26 2004
Return-Path: <risky@junior.mephi.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9B4D916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  3 Jun 2004 13:05:26 -0700 (PDT)
Received: from junior.mephi.ru (junior.mephi.ru [194.67.66.129])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8BAA243D48
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  3 Jun 2004 13:05:25 -0700 (PDT)
	(envelope-from risky@junior.mephi.ru)
Received: (from risky@localhost)
	by junior.mephi.ru (8.9.3p3/8.9.3) id AAA41913;
	Fri, 4 Jun 2004 00:12:04 +0400 (MSD)
	(envelope-from risky)
Message-Id: <200406032012.AAA41913@junior.mephi.ru>
Date: Fri, 4 Jun 2004 00:12:04 +0400 (MSD)
From: "Sergey V. Efimoff" <risky@stabilis.ru>
Reply-To: "Sergey V. Efimoff" <risky@stabilis.ru>
To: FreeBSD-gnats-submit@freebsd.org
Subject: NFS Diskless Mount problem
X-Send-Pr-Version: 3.2

>Number:         67545
>Category:       kern
>Synopsis:       [nfs] NFS Diskless Mount Option Suggestion
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          suspended
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 03 13:10:28 PDT 2004
>Closed-Date:    
>Last-Modified:  Fri Feb 15 05:59:05 UTC 2008
>Originator:     Sergey V. Efimoff
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Stabilis Systems Ltd.
>Environment:
System: FreeBSD mordor.stabilis.ltd 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Apr 18 12:17:12 MSD 2004 risky@mordor.stabilis.ltd:/usr/src/sys/i386/compile/MORDOR i386
 
 
>Description:
While implementing remote boot of FreeBSD operating system,
I figured out some problem. The server was functioning under
control of Linux Slackware (don't mention it, it was
necessary due to hardware compatibility), client OS was
5.2-CURRENT. Root file system was mounted over NFS.
  
The client OS booted well, but then some software tried
to use flock() syscall, which is not supported over NFS
even with rpc.lockd (I don't know if it is connected with
BSD vs System V problem or with incompatibility of
BSD and Linux implementations of rpc.lockd). When lockd
is not loaded, flock() fails, otherwise it hangs.
  
mount_nfs() has '-L' option which allows to forward lock
requests to a local system thus making rpc.lockd use
sensless and, therefore, allows to avoid incompatibility
problems. But, as far as I know, it is useful only during
initial mount, not when changing mount options later.
As for inital root NFS mount, the kernel does not set
NFSMNT_NOLOCKD flag when mounting remote file system,
so rpc.lockd use becomes mandatory.
  
I had to apply some cheat on nfs_vfsopts.c in order to
disable lockd calls; it was simply code line like
args->flags |= NFSMNT_NOLOCKD. Then I thought that it
probably would not be a bad idea to include kernel option
into LINT which would allow user to decide if he wants
to use NFS root with rpc.lockd or without it.
>How-To-Repeat:
Simply try passwd(1) on diskless station regardless of rpc.lockd
presence with Slackware NFS server.
>Fix:
The code line mentioned above works fine being inserted
into nfs_mountdiskless() before mountnfs() (nfsclient/nfs_vfsopts.c).
The best solution (as for my point of view) is kernel option.
 

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: brooks 
State-Changed-When: Wed Mar 2 02:40:53 GMT 2005 
State-Changed-Why:  
FreeBSD 5.2 has an implementation of rpc.lockd.  Is there any reasion 
why enabling it is not a viable solution here? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67545 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 30 01:27:52 GMT 2005 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67545 

From: Kai Mosebach <Kai.Mosebach@genedata.com>
To: bug-followup@FreeBSD.org, risky@stabilis.ru
Cc:  
Subject: Re: kern/67545: [nfs] NFS Diskless Mount Option Suggestion
Date: Wed, 22 Mar 2006 15:50:26 +0100

 As menitoned by Sergey, running the local rpc.lockd nor the lockd on the 
 Linux NFS Server is not solving the problem.
 
 To solve the problem one must mount the root nfs filesystem with -L 
 which is obviously not possible for the root nfs unless you hack the kernel.
 
 What is the procedure to reopen this report?
 
 Best Kai
State-Changed-From-To: closed->open 
State-Changed-By: linimon 
State-Changed-When: Wed Mar 22 20:27:02 UTC 2006 
State-Changed-Why:  
A more recent respondant says this problem still exists. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67545 

From: Volker <volker@vwsoft.com>
To: bug-followup@FreeBSD.org, risky@stabilis.ru, 
 Kai.Mosebach@genedata.com
Cc:  
Subject: Re: kern/67545: [nfs] NFS Diskless Mount Option Suggestion
Date: Thu, 14 Feb 2008 20:58:32 +0100

 Sergey, Kai,
 
 please tell us if you're still able to see this problem. If that still
 is an issue, please report back the version you're actually using.
 
 Thanks!

From: kai@freshx.de
To: bug-followup@FreeBSD.org, Volker <volker@vwsoft.com>
Cc: genedata@komadev.de
Subject: Re: kern/67545: [nfs] NFS Diskless Mount Option Suggestion
Date: Fri, 15 Feb 2008 00:07:10 +0100

 i was able to see this in 6.0, 6.-RELEASE and some early 6.2-CURRENT versions
 (no version details available anymore, sorry). no more tests on more recent
 systems where done after.
 
 Best Kai
 
 > Sergey, Kai,
 > 
 > please tell us if you're still able to see this problem. If that still
 > is an issue, please report back the version you're actually using.
 > 
 > Thanks!
 > 
 > 
 > 
 
 
 
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Fri Feb 15 05:58:32 UTC 2008 
State-Changed-Why:  
Unfortunately we need someone to confirm this is still a problem on 
either 6.3 or 7.0 so that we can proceed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67545 
>Unformatted:
