€•ÕƒŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ5/translations/zh_CN/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/zh_TW/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/it_IT/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/ja_JP/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/ko_KR/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/pt_BR/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/sp_SP/filesystems/nfs/client-identifier”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒO/var/lib/git/docbuild/linux/Documentation/filesystems/nfs/client-identifier.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒNFSv4 client identifier”h]”hŒNFSv4 client identifier”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hXGThis document explains how the NFSv4 protocol identifies client instances in order to maintain file open and lock state during system restarts. A special identifier and principal are maintained on each client. These can be set by administrators, scripts provided by site administrators, or tools provided by Linux distributors.”h]”hXGThis document explains how the NFSv4 protocol identifies client instances in order to maintain file open and lock state during system restarts. A special identifier and principal are maintained on each client. These can be set by administrators, scripts provided by site administrators, or tools provided by Linux distributors.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒZThere are risks if a client's NFSv4 identifier and its principal are not chosen carefully.”h]”hŒ\There are risks if a client’s NFSv4 identifier and its principal are not chosen carefully.”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhûh²hh³hÇh´KubhÞ)”}”(hŒ†The NFSv4 protocol uses "lease-based file locking". Leases help NFSv4 servers provide file lock guarantees and manage their resources.”h]”hŒŠThe NFSv4 protocol uses “lease-based file lockingâ€. Leases help NFSv4 servers provide file lock guarantees and manage their resources.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhûh²hubhÞ)”}”(hŒžSimply put, an NFSv4 server creates a lease for each NFSv4 client. The server collects each client's file open and lock state under the lease for that client.”h]”hŒ Simply put, an NFSv4 server creates a lease for each NFSv4 client. The server collects each client’s file open and lock state under the lease for that client.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhûh²hubhÞ)”}”(hŒ¼The client is responsible for periodically renewing its leases. While a lease remains valid, the server holding that lease guarantees the file locks the client has created remain in place.”h]”hŒ¼The client is responsible for periodically renewing its leases. While a lease remains valid, the server holding that lease guarantees the file locks the client has created remain in place.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhûh²hubhÞ)”}”(hXTIf a client stops renewing its lease (for example, if it crashes), the NFSv4 protocol allows the server to remove the client's open and lock state after a certain period of time. When a client restarts, it indicates to servers that open and lock state associated with its previous leases is no longer valid and can be destroyed immediately.”h]”hXVIf a client stops renewing its lease (for example, if it crashes), the NFSv4 protocol allows the server to remove the client’s open and lock state after a certain period of time. When a client restarts, it indicates to servers that open and lock state associated with its previous leases is no longer valid and can be destroyed immediately.”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K!hhûh²hubhÞ)”}”(hXhIn addition, each NFSv4 server manages a persistent list of client leases. When the server restarts and clients attempt to recover their state, the server uses this list to distinguish amongst clients that held state before the server restarted and clients sending fresh OPEN and LOCK requests. This enables file locks to persist safely across server restarts.”h]”hXhIn addition, each NFSv4 server manages a persistent list of client leases. When the server restarts and clients attempt to recover their state, the server uses this list to distinguish amongst clients that held state before the server restarted and clients sending fresh OPEN and LOCK requests. This enables file locks to persist safely across server restarts.”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K(hhûh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒNFSv4 client identifiers”h]”hŒNFSv4 client identifiers”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjZh²hh³hÇh´K0ubhÞ)”}”(hŒ¢Each NFSv4 client presents an identifier to NFSv4 servers so that they can associate the client with its lease. Each client's identifier consists of two elements:”h]”hŒ¤Each NFSv4 client presents an identifier to NFSv4 servers so that they can associate the client with its lease. Each client’s identifier consists of two elements:”…””}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K2hjZh²hubhŒ block_quote”“”)”}”(hŒ¯- co_ownerid: An arbitrary but fixed string. - boot verifier: A 64-bit incarnation verifier that enables a server to distinguish successive boot epochs of the same client. ”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ+co_ownerid: An arbitrary but fixed string. ”h]”hÞ)”}”(hŒ*co_ownerid: An arbitrary but fixed string.”h]”hŒ*co_ownerid: An arbitrary but fixed string.”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K6hj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubj…)”}”(hŒ}boot verifier: A 64-bit incarnation verifier that enables a server to distinguish successive boot epochs of the same client. ”h]”hÞ)”}”(hŒ|boot verifier: A 64-bit incarnation verifier that enables a server to distinguish successive boot epochs of the same client.”h]”hŒ|boot verifier: A 64-bit incarnation verifier that enables a server to distinguish successive boot epochs of the same client.”…””}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K8hjžubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÇh´K6hj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1jyh³hÇh´K6hjZh²hubhÞ)”}”(hŒ•The NFSv4.0 specification refers to these two items as an "nfs_client_id4". The NFSv4.1 specification refers to these two items as a "client_owner4".”h]”hŒThe NFSv4.0 specification refers to these two items as an “nfs_client_id4â€. The NFSv4.1 specification refers to these two items as a “client_owner4â€.”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K;hjZh²hubhÞ)”}”(hXNFSv4 servers tie this identifier to the principal and security flavor that the client used when presenting it. Servers use this principal to authorize subsequent lease modification operations sent by the client. Effectively this principal is a third element of the identifier.”h]”hXNFSv4 servers tie this identifier to the principal and security flavor that the client used when presenting it. Servers use this principal to authorize subsequent lease modification operations sent by the client. Effectively this principal is a third element of the identifier.”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K?hjZh²hubhÞ)”}”(hŒjAs part of the identity presented to servers, a good "co_ownerid" string has several important properties:”h]”hŒnAs part of the identity presented to servers, a good “co_ownerid†string has several important properties:”…””}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KEhjZh²hubjz)”}”(hX¯- The "co_ownerid" string identifies the client during reboot recovery, therefore the string is persistent across client reboots. - The "co_ownerid" string helps servers distinguish the client from others, therefore the string is globally unique. Note that there is no central authority that assigns "co_ownerid" strings. - Because it often appears on the network in the clear, the "co_ownerid" string does not reveal private information about the client itself. - The content of the "co_ownerid" string is set and unchanging before the client attempts NFSv4 mounts after a restart. - The NFSv4 protocol places a 1024-byte limit on the size of the "co_ownerid" string. ”h]”j€)”}”(hhh]”(j…)”}”(hŒThe "co_ownerid" string identifies the client during reboot recovery, therefore the string is persistent across client reboots.”h]”hÞ)”}”(hŒThe "co_ownerid" string identifies the client during reboot recovery, therefore the string is persistent across client reboots.”h]”hŒƒThe “co_ownerid†string identifies the client during reboot recovery, therefore the string is persistent across client reboots.”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KHhjõubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjòubj…)”}”(hŒ½The "co_ownerid" string helps servers distinguish the client from others, therefore the string is globally unique. Note that there is no central authority that assigns "co_ownerid" strings.”h]”hÞ)”}”(hŒ½The "co_ownerid" string helps servers distinguish the client from others, therefore the string is globally unique. Note that there is no central authority that assigns "co_ownerid" strings.”h]”hŒÅThe “co_ownerid†string helps servers distinguish the client from others, therefore the string is globally unique. Note that there is no central authority that assigns “co_ownerid†strings.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KKhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjòubj…)”}”(hŒŠBecause it often appears on the network in the clear, the "co_ownerid" string does not reveal private information about the client itself.”h]”hÞ)”}”(hŒŠBecause it often appears on the network in the clear, the "co_ownerid" string does not reveal private information about the client itself.”h]”hŒŽBecause it often appears on the network in the clear, the “co_ownerid†string does not reveal private information about the client itself.”…””}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KOhj%ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjòubj…)”}”(hŒuThe content of the "co_ownerid" string is set and unchanging before the client attempts NFSv4 mounts after a restart.”h]”hÞ)”}”(hŒuThe content of the "co_ownerid" string is set and unchanging before the client attempts NFSv4 mounts after a restart.”h]”hŒyThe content of the “co_ownerid†string is set and unchanging before the client attempts NFSv4 mounts after a restart.”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KRhj=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjòubj…)”}”(hŒTThe NFSv4 protocol places a 1024-byte limit on the size of the "co_ownerid" string. ”h]”hÞ)”}”(hŒSThe NFSv4 protocol places a 1024-byte limit on the size of the "co_ownerid" string.”h]”hŒWThe NFSv4 protocol places a 1024-byte limit on the size of the “co_ownerid†string.”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KThjUubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjòubeh}”(h]”h ]”h"]”h$]”h&]”j¼j½uh1jh³hÇh´KHhjîubah}”(h]”h ]”h"]”h$]”h&]”uh1jyh³hÇh´KHhjZh²hubeh}”(h]”Œnfsv4-client-identifiers”ah ]”h"]”Œnfsv4 client identifiers”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K0ubhÉ)”}”(hhh]”(hÎ)”}”(hŒProtecting NFSv4 lease state”h]”hŒProtecting NFSv4 lease state”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KXubhÞ)”}”(hŒæNFSv4 servers utilize the "client_owner4" as described above to assign a unique lease to each client. Under this scheme, there are circumstances where clients can interfere with each other. This is referred to as "lease stealing".”h]”hŒîNFSv4 servers utilize the “client_owner4†as described above to assign a unique lease to each client. Under this scheme, there are circumstances where clients can interfere with each other. This is referred to as “lease stealingâ€.”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KZhjh²hubhÞ)”}”(hX‚If distinct clients present the same "co_ownerid" string and use the same principal (for example, AUTH_SYS and UID 0), a server is unable to tell that the clients are not the same. Each distinct client presents a different boot verifier, so it appears to the server as if there is one client that is rebooting frequently. Neither client can maintain open or lock state in this scenario.”h]”hX†If distinct clients present the same “co_ownerid†string and use the same principal (for example, AUTH_SYS and UID 0), a server is unable to tell that the clients are not the same. Each distinct client presents a different boot verifier, so it appears to the server as if there is one client that is rebooting frequently. Neither client can maintain open or lock state in this scenario.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K_hjh²hubhÞ)”}”(hŒÙIf distinct clients present the same "co_ownerid" string and use distinct principals, the server is likely to allow the first client to operate normally but reject subsequent clients with the same "co_ownerid" string.”h]”hŒáIf distinct clients present the same “co_ownerid†string and use distinct principals, the server is likely to allow the first client to operate normally but reject subsequent clients with the same “co_ownerid†string.”…””}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kfhjh²hubhÞ)”}”(hXyIf a client's "co_ownerid" string or principal are not stable, state recovery after a server or client reboot is not guaranteed. If a client unexpectedly restarts but presents a different "co_ownerid" string or principal to the server, the server orphans the client's previous open and lock state. This blocks access to locked files until the server removes the orphaned state.”h]”hX…If a client’s “co_ownerid†string or principal are not stable, state recovery after a server or client reboot is not guaranteed. If a client unexpectedly restarts but presents a different “co_ownerid†string or principal to the server, the server orphans the client’s previous open and lock state. This blocks access to locked files until the server removes the orphaned state.”…””}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kkhjh²hubhÞ)”}”(hXIf the server restarts and a client presents a changed "co_ownerid" string or principal to the server, the server will not allow the client to reclaim its open and lock state, and may give those locks to other clients in the meantime. This is referred to as "lock stealing".”h]”hXIf the server restarts and a client presents a changed “co_ownerid†string or principal to the server, the server will not allow the client to reclaim its open and lock state, and may give those locks to other clients in the meantime. This is referred to as “lock stealingâ€.”…””}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Krhjh²hubhÞ)”}”(hŒuLease stealing and lock stealing increase the potential for denial of service and in rare cases even data corruption.”h]”hŒuLease stealing and lock stealing increase the potential for denial of service and in rare cases even data corruption.”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kxhjh²hubeh}”(h]”Œprotecting-nfsv4-lease-state”ah ]”h"]”Œprotecting nfsv4 lease state”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KXubhÉ)”}”(hhh]”(hÎ)”}”(hŒ*Selecting an appropriate client identifier”h]”hŒ*Selecting an appropriate client identifier”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjîh²hh³hÇh´K|ubhÞ)”}”(hX½By default, the Linux NFSv4 client implementation constructs its "co_ownerid" string starting with the words "Linux NFS" followed by the client's UTS node name (the same node name, incidentally, that is used as the "machine name" in an AUTH_SYS credential). In small deployments, this construction is usually adequate. Often, however, the node name by itself is not adequately unique, and can change unexpectedly. Problematic situations include:”h]”hXËBy default, the Linux NFSv4 client implementation constructs its “co_ownerid†string starting with the words “Linux NFS†followed by the client’s UTS node name (the same node name, incidentally, that is used as the “machine name†in an AUTH_SYS credential). In small deployments, this construction is usually adequate. Often, however, the node name by itself is not adequately unique, and can change unexpectedly. Problematic situations include:”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K~hjîh²hubjz)”}”(hX<- NFS-root (diskless) clients, where the local DHCP server (or equivalent) does not provide a unique host name. - "Containers" within a single Linux host. If each container has a separate network namespace, but does not use the UTS namespace to provide a unique host name, then there can be multiple NFS client instances with the same host name. - Clients across multiple administrative domains that access a common NFS server. If hostnames are not assigned centrally then uniqueness cannot be guaranteed unless a domain name is included in the hostname. ”h]”j€)”}”(hhh]”(j…)”}”(hŒnNFS-root (diskless) clients, where the local DHCP server (or equivalent) does not provide a unique host name. ”h]”hÞ)”}”(hŒmNFS-root (diskless) clients, where the local DHCP server (or equivalent) does not provide a unique host name.”h]”hŒmNFS-root (diskless) clients, where the local DHCP server (or equivalent) does not provide a unique host name.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K†hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubj…)”}”(hŒé"Containers" within a single Linux host. If each container has a separate network namespace, but does not use the UTS namespace to provide a unique host name, then there can be multiple NFS client instances with the same host name. ”h]”hÞ)”}”(hŒè"Containers" within a single Linux host. If each container has a separate network namespace, but does not use the UTS namespace to provide a unique host name, then there can be multiple NFS client instances with the same host name.”h]”hŒì“Containers†within a single Linux host. If each container has a separate network namespace, but does not use the UTS namespace to provide a unique host name, then there can be multiple NFS client instances with the same host name.”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‰hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubj…)”}”(hŒÏClients across multiple administrative domains that access a common NFS server. If hostnames are not assigned centrally then uniqueness cannot be guaranteed unless a domain name is included in the hostname. ”h]”hÞ)”}”(hŒÎClients across multiple administrative domains that access a common NFS server. If hostnames are not assigned centrally then uniqueness cannot be guaranteed unless a domain name is included in the hostname.”h]”hŒÎClients across multiple administrative domains that access a common NFS server. If hostnames are not assigned centrally then uniqueness cannot be guaranteed unless a domain name is included in the hostname.”…””}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KŽhjDubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubeh}”(h]”h ]”h"]”h$]”h&]”j¼j½uh1jh³hÇh´K†hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jyh³hÇh´K†hjîh²hubhÞ)”}”(hŒKLinux provides two mechanisms to add uniqueness to its "co_ownerid" string:”h]”hŒOLinux provides two mechanisms to add uniqueness to its “co_ownerid†string:”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K“hjîh²hubjz)”}”(hX˜nfs.nfs4_unique_id This module parameter can set an arbitrary uniquifier string via the kernel command line, or when the "nfs" module is loaded. /sys/fs/nfs/net/nfs_client/identifier This virtual file, available since Linux 5.3, is local to the network namespace in which it is accessed and so can provide distinction between network namespaces (containers) when the hostname remains uniform. ”h]”hŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ‘nfs.nfs4_unique_id This module parameter can set an arbitrary uniquifier string via the kernel command line, or when the "nfs" module is loaded. ”h]”(hŒterm”“”)”}”(hŒnfs.nfs4_unique_id”h]”hŒnfs.nfs4_unique_id”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´K™hjubhŒ definition”“”)”}”(hhh]”hÞ)”}”(hŒ}This module parameter can set an arbitrary uniquifier string via the kernel command line, or when the "nfs" module is loaded.”h]”hŒThis module parameter can set an arbitrary uniquifier string via the kernel command line, or when the “nfs†module is loaded.”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K—hj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K™hj|ubj€)”}”(hŒø/sys/fs/nfs/net/nfs_client/identifier This virtual file, available since Linux 5.3, is local to the network namespace in which it is accessed and so can provide distinction between network namespaces (containers) when the hostname remains uniform. ”h]”(j†)”}”(hŒ%/sys/fs/nfs/net/nfs_client/identifier”h]”hŒ%/sys/fs/nfs/net/nfs_client/identifier”…””}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´KŸhj´ubj–)”}”(hhh]”hÞ)”}”(hŒÑThis virtual file, available since Linux 5.3, is local to the network namespace in which it is accessed and so can provide distinction between network namespaces (containers) when the hostname remains uniform.”h]”hŒÑThis virtual file, available since Linux 5.3, is local to the network namespace in which it is accessed and so can provide distinction between network namespaces (containers) when the hostname remains uniform.”…””}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KœhjÆubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hj´ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KŸhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjvubah}”(h]”h ]”h"]”h$]”h&]”uh1jyh³hÇh´K–hjîh²hubhÞ)”}”(hŒýNote that this file is empty on name-space creation. If the container system has access to some sort of per-container identity then that uniquifier can be used. For example, a uniquifier might be formed at boot using the container's internal identifier:”h]”hŒÿNote that this file is empty on name-space creation. If the container system has access to some sort of per-container identity then that uniquifier can be used. For example, a uniquifier might be formed at boot using the container’s internal identifier:”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¡hjîh²hubjz)”}”(hŒ\sha256sum /etc/machine-id | awk '{print $1}' \\ > /sys/fs/nfs/net/nfs_client/identifier ”h]”j{)”}”(hhh]”j€)”}”(hŒXsha256sum /etc/machine-id | awk '{print $1}' \\ > /sys/fs/nfs/net/nfs_client/identifier ”h]”(j†)”}”(hŒ/sha256sum /etc/machine-id | awk '{print $1}' \\”h]”hŒ3sha256sum /etc/machine-id | awk ‘{print $1}’ \”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…h³hÇh´K§hjubj–)”}”(hhh]”hÞ)”}”(hŒ'> /sys/fs/nfs/net/nfs_client/identifier”h]”hŒ'> /sys/fs/nfs/net/nfs_client/identifier”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K§hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K§hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jzhjýubah}”(h]”h ]”h"]”h$]”h&]”uh1jyh³hÇh´K¦hjîh²hubeh}”(h]”Œ*selecting-an-appropriate-client-identifier”ah ]”h"]”Œ*selecting an appropriate client identifier”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K|ubhÉ)”}”(hhh]”(hÎ)”}”(hŒSecurity considerations”h]”hŒSecurity considerations”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjGh²hh³hÇh´KªubhÞ)”}”(hŒYThe use of cryptographic security for lease management operations is strongly encouraged.”h]”hŒYThe use of cryptographic security for lease management operations is strongly encouraged.”…””}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¬hjGh²hubhÞ)”}”(hXŒIf NFS with Kerberos is not configured, a Linux NFSv4 client uses AUTH_SYS and UID 0 as the principal part of its client identity. This configuration is not only insecure, it increases the risk of lease and lock stealing. However, it might be the only choice for client configurations that have no local persistent storage. "co_ownerid" string uniqueness and persistence is critical in this case.”h]”hXIf NFS with Kerberos is not configured, a Linux NFSv4 client uses AUTH_SYS and UID 0 as the principal part of its client identity. This configuration is not only insecure, it increases the risk of lease and lock stealing. However, it might be the only choice for client configurations that have no local persistent storage. “co_ownerid†string uniqueness and persistence is critical in this case.”…””}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¯hjGh²hubhÞ)”}”(hXPWhen a Kerberos keytab is present on a Linux NFS client, the client attempts to use one of the principals in that keytab when identifying itself to servers. The "sec=" mount option does not control this behavior. Alternately, a single-user client with a Kerberos principal can use that principal in place of the client's host principal.”h]”hXVWhen a Kerberos keytab is present on a Linux NFS client, the client attempts to use one of the principals in that keytab when identifying itself to servers. The “sec=†mount option does not control this behavior. Alternately, a single-user client with a Kerberos principal can use that principal in place of the client’s host principal.”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K·hjGh²hubhÞ)”}”(hX0Using Kerberos for this purpose enables the client and server to use the same lease for operations covered by all "sec=" settings. Additionally, the Linux NFS client uses the RPCSEC_GSS security flavor with Kerberos and the integrity QOS to prevent in-transit modification of lease modification requests.”h]”hX4Using Kerberos for this purpose enables the client and server to use the same lease for operations covered by all “sec=†settings. Additionally, the Linux NFS client uses the RPCSEC_GSS security flavor with Kerberos and the integrity QOS to prevent in-transit modification of lease modification requests.”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¾hjGh²hubeh}”(h]”Œsecurity-considerations”ah ]”h"]”Œsecurity considerations”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KªubhÉ)”}”(hhh]”(hÎ)”}”(hŒAdditional notes”h]”hŒAdditional notes”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj˜h²hh³hÇh´KÅubhÞ)”}”(hŒ¨The Linux NFSv4 client establishes a single lease on each NFSv4 server it accesses. NFSv4 mounts from a Linux NFSv4 client of a particular server then share that lease.”h]”hŒ¨The Linux NFSv4 client establishes a single lease on each NFSv4 server it accesses. NFSv4 mounts from a Linux NFSv4 client of a particular server then share that lease.”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÆhj˜h²hubhÞ)”}”(hXTOnce a client establishes open and lock state, the NFSv4 protocol enables lease state to transition to other servers, following data that has been migrated. This hides data migration completely from running applications. The Linux NFSv4 client facilitates state migration by presenting the same "client_owner4" to all servers it encounters.”h]”hXXOnce a client establishes open and lock state, the NFSv4 protocol enables lease state to transition to other servers, following data that has been migrated. This hides data migration completely from running applications. The Linux NFSv4 client facilitates state migration by presenting the same “client_owner4†to all servers it encounters.”…””}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÊhj˜h²hubeh}”(h]”Œadditional-notes”ah ]”h"]”Œadditional notes”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KÅubeh}”(h]”Œnfsv4-client-identifier”ah ]”h"]”Œnfsv4 client identifier”ah$]”h&]”uh1hÈhhh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒSee Also”h]”hŒSee Also”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÕh²hh³hÇh´KÓubjz)”}”(hŒi- nfs(5) - kerberos(7) - RFC 7530 for the NFSv4.0 specification - RFC 8881 for the NFSv4.1 specification.”h]”j€)”}”(hhh]”(j…)”}”(hŒnfs(5)”h]”hÞ)”}”(hjïh]”hŒnfs(5)”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÕhjíubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjêubj…)”}”(hŒ kerberos(7)”h]”hÞ)”}”(hjh]”hŒ kerberos(7)”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÖhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjêubj…)”}”(hŒ&RFC 7530 for the NFSv4.0 specification”h]”hÞ)”}”(hjh]”hŒ&RFC 7530 for the NFSv4.0 specification”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K×hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjêubj…)”}”(hŒ'RFC 8881 for the NFSv4.1 specification.”h]”hÞ)”}”(hj4h]”hŒ'RFC 8881 for the NFSv4.1 specification.”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KØhj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjêubeh}”(h]”h ]”h"]”h$]”h&]”j¼j½uh1jh³hÇh´KÕhjæubah}”(h]”h ]”h"]”h$]”h&]”uh1jyh³hÇh´KÕhjÕh²hubeh}”(h]”Œsee-also”ah ]”h"]”Œsee also”ah$]”h&]”uh1hÈhhh²hh³hÇh´KÓubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j€Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jÒjÏjWjTj~j{jëjèjDjAj•j’jÊjÇjZjWuŒ nametypes”}”(jÒ‰jW‰j~‰jë‰jD‰j•‰jʉjZ‰uh}”(jÏhÊjThûj{jZjèjjAjîj’jGjÇj˜jWjÕuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.