From: Sebastien Buisson Date: Thu, 1 Jul 2021 09:09:22 +0000 (+0200) Subject: LUDOC-493 sec: update nodemap section for projid X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=437f8f44f13af4ed80a5379d37db696968577520;p=doc%2Fmanual.git LUDOC-493 sec: update nodemap section for projid This patch adds documentation for the projid mapping feature, as implemented by LU-14797. This doc is added under the Mapping UIDs and GIDs with Nodemap section. Signed-off-by: Sebastien Buisson Change-Id: Ice2709847a07cd3ce02703317f6cc5ecd9a4bed3 Reviewed-on: https://review.whamcloud.com/44124 Tested-by: jenkins Reviewed-by: Andreas Dilger --- diff --git a/LustreNodemap.xml b/LustreNodemap.xml index 21a0c46..72ec50d 100644 --- a/LustreNodemap.xml +++ b/LustreNodemap.xml @@ -223,6 +223,13 @@ drwxr-xr-x 3 root root 4096 Jul 23 09:02 .. +
+ Mapping Project IDs + Like UIDs and GIDs, PROJIDs can be mapped via nodemaps, from client + to file system IDs and conversely. To declare a PROJID mapping, use the + projid type: + mgs# lctl nodemap_add_idmap --name BirdResearchSite --idtype projid --idmap 33:1 +
@@ -238,12 +245,23 @@ drwxr-xr-x 3 root root 4096 Jul 23 09:02 .. Several properties exist, off by default, which change client behavior: admin, - trusted, squash_uid, - squash_gid, and deny_unknown. + trusted, map_mode, + squash_uid, squash_gid, + squash_projid, deny_unknown, + audit_mode and forbid_encryption. + The property admin defines whether + root is squashed on the policy group. By default, it is + squashed, unless this property is enabled. Coupled with the + trusted property, this will allow unmapped + access for backup nodes, transfer points, or other administrative + mount points. + + + The trusted property permits members of a policy group to see the file system's canonical identifiers. In the above example, UID 11002 and GID 11001 will be seen without @@ -252,12 +270,29 @@ drwxr-xr-x 3 root root 4096 Jul 23 09:02 .. - The property admin defines whether - root is squashed on the policy group. By default, it is - squashed, unless this property is enabled. Coupled with the - trusted property, this will allow unmapped - access for backup nodes, transfer points, or other administrative - mount points. + The map_mode property lets + control the way mapping is carried out. By default it is set to + all which means the nodemap will map UIDs, GIDs, + and PROJIDs. If set to uid_only or just + uid, only UIDs will be mapped. If set to + gid_only or just gid, only GIDs + will be mapped. If set to projid_only or just + projid, only PROJIDs will be mapped. If set to + both, both UIDs and GIDs will be mapped. Multiple + values can be specified, comma separated. + + + + The properties squash_uid, + squash_gid and squash_projid define the + default UID, GID and PROJID respectively that users will be squashed + to if unmapped, unless the deny_unknown flag is set, in which case + access will still be denied. + + + The squash_projid property was introduced + in Lustre 2.15 + @@ -269,11 +304,20 @@ drwxr-xr-x 3 root root 4096 Jul 23 09:02 .. - The properties squash_uid and - squash_gid define the default UID and GID that users will - be squashed to if unmapped, unless the deny_unknown flag is set, in - which case access will still be denied. - + The property audit_mode lets + control which Lustre client nodes can trigger the recording of file + system access events to the Changelogs. When this flag is set to 1, + clients will be able to record file system access events to the + Changelogs, if Changelogs are otherwise activated. When set to 0, + events are not logged into the Changelogs, no matter if Changelogs are + activated or not. By default, this flag is set to 1 in newly created + nodemap entries. And it is also set to 1 in 'default' nodemap. + + + + The property + forbid_encryption prevents clients from using + encryption. @@ -324,6 +368,14 @@ mgs# lctl nodemap_modify --name BirdAdminSite --prope admin property is off, and root is not part of any mapping. + To prevent a client from changing quota settings + for a project other than the one assigned to the fileset it is restricted + to, you should map the PROJID to itself, set map_mode + to projid, and then trusted to + 0 and deny_unknown to 1. This way, only operations on + the designated PROJID will be allowed. + + When nodemaps are modified, the change events are queued and distributed across the cluster. Under normal conditions, these changes can take around ten seconds to propagate. During this distribution