From nobody Wed Sep 21 00:54:32 2022 X-Original-To: dev-commits-src-all@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 4MXKgY0bnzz4crhT; Wed, 21 Sep 2022 00:54:33 +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 4MXKgY08F6z3pjW; Wed, 21 Sep 2022 00:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663721673; 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=RDq7KmK0YgijJTYRsKYsfanRRj8S2yMv+7tel9R0oE0=; b=FVQY4gJlPf4BJW8/g+q86hH/RWRhLwVRdbZ7g9J+vwttDyHiwG6JZdypugBVPm9ElCadFA rcTC0Bioq40POLz9HjwNGqJ7NFPIOHmPoezBjNK/zu5mysnpQRe2rCngfAFdqgZZdyXz+2 i0sZb0MZiRlKJG3qByXurhHrsGXh/jj18MIhh4UPpdxce//xHMn/S8jkXJcSrTaSV/17Vh NogVGtejDzaCKymYeN0VR+q9W4l6C03tVuMVIVUvsTUUR1agHOsCTWW3dskjn3y5ty+gE1 m9aMSRzpg+/E6d4ZbZ3NHjmEOOgDBuqU9Zuhr0scvkfwDveDK8nYuJR0oq1zQQ== 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 4MXKgX6LMtztkp; Wed, 21 Sep 2022 00:54:32 +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 28L0sWiC018136; Wed, 21 Sep 2022 00:54:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28L0sW63018135; Wed, 21 Sep 2022 00:54:32 GMT (envelope-from git) Date: Wed, 21 Sep 2022 00:54:32 GMT Message-Id: <202209210054.28L0sW63018135@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 2a96fd728cab - stable/13 - mount_nfs.8: Update for NFSv4 use of "nolockd" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a96fd728cab086c8a82418a99fc6e6a673c7044 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663721673; 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=RDq7KmK0YgijJTYRsKYsfanRRj8S2yMv+7tel9R0oE0=; b=NKJ7UTPt8oZ4gqNkGRCPe/vfMeXkggBiazVL3M5i3kDc27TJc+8AVMcoPUtDgdSpG3s40C gL9OVRFPo7rPmW5zv0buXHrPk51+7trRlUe58ga3NAJmL8745R3i0Zw+UE+QSTRGB7NaD0 kEAb/JM3WaWrcSHSs9eZ3Raz5yMzZ0fXwVttv2jlRxgbTPzb5KqCqxK2wpw48BgqcT3Kba kWDU25NgXbohkEhTyQtZ3bwfFE2dRWueGC3TYtDdtabUQGk2zltTXwwlKVfQuAGqXem+26 Yswd6lf/U6itNZ946g+XHoAwDS3amh9ZzAez0lxTOr6uKx8yX1v/nVZPSgHvMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663721673; a=rsa-sha256; cv=none; b=r1jY2RUqfNe/xhmwY9dZLeyGgVDem+ZO54bnf3D3kBecRiyTcsRm4f/W3lvKnrynLGEF5i huDhrLlhnUoLGJoyhGUNH2FlSthjkuCghKvsJ47uq4BE6YodQtms1NiToOKON1cbCQ1/D8 WCgmDkPIDUzY6Sd8NJdNCYCyi0n51aC+yYjWno5CCYNmUS0oW76AQJtSF00j6ClVRtMTis Zo10WzVIjRj9i6odbTVoIcwDgaz9O1o2/vPcO2Fnc+jV9KvRVw7d6jMdApYLuxQ/TcIzJc R2aMTvS62l0KBZ0XSdaA+IGmcSJjfaTQ+RZKpkGf/ekxfEH7dtmRNx5dJLY+eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=2a96fd728cab086c8a82418a99fc6e6a673c7044 commit 2a96fd728cab086c8a82418a99fc6e6a673c7044 Author: Rick Macklem AuthorDate: 2022-09-07 21:07:20 +0000 Commit: Rick Macklem CommitDate: 2022-09-21 00:50:45 +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. (cherry picked from commit 9b436906fa10b8bec4f7c231b389ed9ef5b2acad) --- 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.