From patchwork Mon Mar 21 05:20:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 12786814 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3AD0C433FE for ; Mon, 21 Mar 2022 05:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344381AbiCUFWS (ORCPT ); Mon, 21 Mar 2022 01:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243430AbiCUFWQ (ORCPT ); Mon, 21 Mar 2022 01:22:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5363C3B556 for ; Sun, 20 Mar 2022 22:20:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E83621F37C; Mon, 21 Mar 2022 05:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647840049; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2qDexzwyYQyiNizGNdOVC1jsqBNoNrDlwwMW/+zM2a0=; b=rB+YL4ui1TG8iXiWYwsD51iF9pn/me6Q+1T5clErbKrO5XUrqimNptDKdMfxQMkO90ybWP 5FCAOT/nhV1xdGrNK6F6LQhF7sBJ4mKihE5TzkkjLgT1DC4Ul5vEtciSrP8FqLktsmRaSs x/bAAfoamF8KYmKq6UN0l9wCrKgmPjQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647840049; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2qDexzwyYQyiNizGNdOVC1jsqBNoNrDlwwMW/+zM2a0=; b=0jDjmvUxZ1Fq979Mdvl7NWMBSciy2qGioYUBwrYk7sYtBcY6q+mU4OiIArTWWJ7Ere7RMA 9uOA3S/buOePMOBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9A905139FF; Mon, 21 Mar 2022 05:20:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 3tJeFjALOGIBdAAAMHmgww (envelope-from ); Mon, 21 Mar 2022 05:20:48 +0000 MIME-Version: 1.0 From: "NeilBrown" To: "Trond Myklebust" , "Anna Schumaker" Cc: "Chuck Lever III" , "Linux NFS Mailing List" Subject: [PATCH v2] NFS: update documentation for the nfs4_unique_id parameter In-reply-to: <164783633625.6096.14575868633417140042@noble.neil.brown.name> References: <164783633625.6096.14575868633417140042@noble.neil.brown.name> Date: Mon, 21 Mar 2022 16:20:43 +1100 Message-id: <164784004337.6096.413613952857713019@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org The documentation for nfs4_unique_id is out-of-date. In particular it claim that when nfs4_unique_id is set, the host name is not used. since Commit 55b592933b7d ("NFSv4: Fix nfs4_init_uniform_client_string for net namespaces") both the unique_id AND the host name are used. Update the documentation to match the code. Signed-off-by: NeilBrown --- After writing the first version I realised that when 'identifier' is set it overrides the module parameter, rather than supplements it. Hence v2. Documentation/admin-guide/nfs/nfs-client.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/nfs/nfs-client.rst b/Documentation/admin-guide/nfs/nfs-client.rst index 6adb6457bc69..36760685dd34 100644 --- a/Documentation/admin-guide/nfs/nfs-client.rst +++ b/Documentation/admin-guide/nfs/nfs-client.rst @@ -36,10 +36,9 @@ administrative requirements that require particular behavior that does not work well as part of an nfs_client_id4 string. The nfs.nfs4_unique_id boot parameter specifies a unique string that can be -used instead of a system's node name when an NFS client identifies itself to -a server. Thus, if the system's node name is not unique, or it changes, its -nfs.nfs4_unique_id stays the same, preventing collision with other clients -or loss of state during NFS reboot recovery or transparent state migration. +used together with a system's node name when an NFS client identifies itself to +a server. Thus, if the system's node name is not unique, its +nfs.nfs4_unique_id can help prevent collisions with other clients. The nfs.nfs4_unique_id string is typically a UUID, though it can contain anything that is believed to be unique across all NFS clients. An @@ -53,8 +52,12 @@ outstanding NFSv4 state has expired, to prevent loss of NFSv4 state. This string can be stored in an NFS client's grub.conf, or it can be provided via a net boot facility such as PXE. It may also be specified as an nfs.ko -module parameter. Specifying a uniquifier string is not support for NFS -clients running in containers. +module parameter. + +This uniquifier string will be the same for all NFS clients running in +containers unless it is overridden by a value written to +/sys/fs/nfs/net/nfs_client/identifier which will be local to the network +namespace of the process which writes. The DNS resolver