From nobody Wed Sep 07 21:08:35 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MNFGq3XPgz4c7v2; Wed, 7 Sep 2022 21:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MNFGq34WYz3RMX; Wed, 7 Sep 2022 21:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662584915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGAxnd8hVTHjK3gLl6MMIs0Jc8aEE+BQcUYzSN+p5gA=; b=mIMwKrLc7ZAuIRYM0EgGMxhQUyhT6XDC+k/0gn7M+sjy2CSRsCT1YJJ3SM57tC+Pqdql/u I4KCEWy0FNXZCK2Ugf1m1KQdfFvN6FOvp9pzCjFrEOeGp0QBhRS8lsDsfnV29UI6cPCltI 7burqHJxavNoKUwWcz4P+Z9bawGjuoKIQtgV7VRD0036xgKv9VbtW0SXATVVgkvgVs5Ufw sdDHr+Ay5j1tJndf3bp7svvpRtkWoDXbh8ThnnDOoecp3nyaHehyVPBaaPPFfARJgLqA5O tN4bYWiuRDIJj9Wu7tTDA7MG0BVU0q4tAahjTMX76gQXc3Do4Oy1WfrlsBUrQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MNFGq27hCzfkL; Wed, 7 Sep 2022 21:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 287L8ZxE066087; Wed, 7 Sep 2022 21:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 287L8Zrp066084; Wed, 7 Sep 2022 21:08:35 GMT (envelope-from git) Date: Wed, 7 Sep 2022 21:08:35 GMT Message-Id: <202209072108.287L8Zrp066084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 9b436906fa10 - main - mount_nfs.8: Update for NFSv4 use of "nolockd" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b436906fa10b8bec4f7c231b389ed9ef5b2acad Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662584915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGAxnd8hVTHjK3gLl6MMIs0Jc8aEE+BQcUYzSN+p5gA=; b=D3zIYpz7LjMuPj7ESKYpszlJhz9c5BSW65IDersNug84XMgyi5ffG1HB3M9dCuHj5HznEW ESkaIZSLz8T/iCKx6Bxgn3Q/IeDi9WZgsFAw00+q9vbzI8P4aaC6u4q0Y68ueBUsEME5GT Zi5bJybfjNgd0Wb9BeqvbBhL/p8odhhFKEq6NW3Stw/NFbMbppABGZEtKzsEgkcjzCSOtj JgIU2NA5OT/3LO9r+itAG4Rq2WsdG9yDQ2Vn+O6/tvMl6d419O7ywZNTSkr+eoYWEHCZc3 D/i3elQlK2WnjxbxKHggXny0482zGES4/XXIOGNspuxPd+kem+zQaasZS1NHrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662584915; a=rsa-sha256; cv=none; b=ujFXiDLbm6PfMibFiHi2dsdN0TxB9EOaAG/nS3WLgzhdB8Jr5QEn/C19Ov7fCNB5hC+jQN u9W9dEq7B9vfj3ZUgtHx2bXjsin0YOsvOgs3WGIWgSUchOWtgknYlHcVL05icQq9C6gMzs YD7RVqCNGL8yQb4r24sh2+srabQBoSh5W9t18IS2EWdP3WDiru4avglAMtJNp4dBsXjb4r cbResOqRIzHeqSylGJsj8mQDwrZkiV2dM575UOmtQBCxF++c3/TaLB/VF2bgEYPn6FFl1S GnBwlPT2FQikQ9+a2kPbkxoqGW8LmuEUZFmQD36AV+rZjjZHh9FZ0oUj9UiZ9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9b436906fa10b8bec4f7c231b389ed9ef5b2acad commit 9b436906fa10b8bec4f7c231b389ed9ef5b2acad Author: Rick Macklem AuthorDate: 2022-09-07 21:07:20 +0000 Commit: Rick Macklem CommitDate: 2022-09-07 21:07:20 +0000 mount_nfs.8: Update for NFSv4 use of "nolockd" Commit 33721eb991d8 enabled use of "nolockd" for NFSv4 mounts. This was done primarily to allow its use with the "intr" mount option. This patch updates the man page for this. This is a content change. Reviewed by: gbe (manpages), karels MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D36462 --- sbin/mount_nfs/mount_nfs.8 | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index 393a40caccb3..9d710d198170 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd August 31, 2022 +.Dd September 5, 2022 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -188,6 +188,10 @@ Same as not specifying Make the mount interruptible, which implies that file system calls that are delayed due to an unresponsive server will fail with EINTR when a termination signal is posted for the process. +To avoid leaving file locks in an indeterminate state on the NFS +server, it is recommended that the +.Cm nolockd +option be used with this option. .It Cm maxgroups Ns = Ns Aq Ar value Set the maximum size of the group list for the credentials to the specified value. @@ -317,22 +321,23 @@ Do .Em not forward .Xr fcntl 2 -locks over the wire via the NLM protocol for NFSv3 mounts. +locks over the wire via the NLM protocol for NFSv3 mounts +or via the NFSv4 protocol for NFSv4 mounts. All locks will be local and not seen by the server -and likewise not seen by other NFS clients for NFSv3 mounts. +and likewise not seen by other NFS clients for NFSv3 or NFSv4 mounts. This removes the need to run the .Xr rpcbind 8 service and the .Xr rpc.statd 8 and .Xr rpc.lockd 8 -servers on the client. +servers on the client for NFSv3 mounts. Note that this option will only be honored when performing the initial mount, it will be silently ignored if used while updating the mount options. -Also, note that NFSv4 mounts do not use these daemons and handle locks over the -wire in the NFSv4 protocol. -As such, this option is meaningless for NFSv4 mounts. +Also, note that NFSv4 mounts do not use these daemons. +The NFSv4 protocol handles locks, +unless this option is specified. .It Cm noncontigwr This mount option allows the NFS client to combine non-contiguous byte ranges being written @@ -659,14 +664,25 @@ A version of the utility appeared in .Bx 4.4 . .Sh BUGS -Since nfsv4 performs open/lock operations that have their ordering strictly +Since NFSv4 performs open/lock operations that have their ordering strictly enforced by the server, the options .Cm intr and .Cm soft cannot be safely used. -For NFSv4 minor version 1 or 2 mounts, these options may -also result -in hung mount points, due to corruption of session slots. +For NFSv4 minor version 1 or 2 mounts, the ordering is done +via session slots and the NFSv4 client now handles broken session slots +fairly well. +As such, if the +.Cm nolockd +option is used along with +.Cm intr +and/or +.Cm soft , +an NFSv4 minor version 1 or 2 mount +should work fairly well, although still not completely correctly. +For NFSv4 minor version 0 mounts, .Cm hard -nfsv4 mounts are strongly recommended. +mounts without the +.Cm intr +mount option is strongly recommended.