LCTL-NODEMAP_ADD_OFFSET(8)

NAME
lctl-nodemap_add_offset - define ID mapping offset for a nodemap

SYNOPSIS
lctl nodemap_add_offset or
lctl nodemap add_offset --name NAME --offset OFFSET --limit FSID_COUNT

DESCRIPTION
nodemap_add_offset adds an identity mapping offset to a nodemap for the UID, GID and PROJID types. This command allows admins to create offset ranges for client systems to avoid overlapping assignments in multi-tenant systems. The FSID_COUNT is used to specify the number of IDs mapped by the range, starting with the root(0) user/group/project ID and extending through FSID_COUNT-1.

An offset range cannot overlap into another's offset range.

A nodemap can only have one offset defined. To modify the offset already defined, just assign a new value. Any existing files will not automatically be remapped to the new OFFSET range. IDs must be manually changed on all files for that nodemap with chown(1) and lfs-project(1) on a trusted client that has access to the unmapped, canonical file system IDs. So modifying a nodemap offset should be avoided if possible.

Once an offset is set on a nodemap, please make sure the explicit mappings are defined so that they do not escape the offset range. This means an explicit mapping should not map a client id to a file system id greater than FSID_COUNT-1. Similarly, the squash_uid, squash_gid and squash_projid values should not be set to a value greater than FSID_COUNT-1. Otherwise this would produce file system IDs outside of the offset range. Finally, the offset limit FSID_COUNT should be defined so that the nobody user (65534) is included in the offset range.

OPTIONS

--name NAME
    The name of the nodemap that the offset will be applied to.

--offset OFFSET
    The given start value for the offset.

--limit FSID_COUNT
    The number of IDs in the offset range.

EXAMPLES
Map the client UID, GID, and PROJID values from the range 0-99999 to the filesystem UID, GID, and PROJID values to the range 100000-199999:
        # lctl nodemap_add_offset --name remotesite --offset 100000 --limit 100000

This map the "-2" user ID used by some systems for the nobody user to the user ID 65534, which will then be offset by OFFSET to a final UID of 165534 in this example:
        # lctl nodemap_add_idmap --name remotesite --idtype uid --idmap 4294967294:65534

AVAILABILITY
lctl nodemap_add_offset is part of the lustre(7) filesystem package since release 2.16.0

SEE ALSO
lustre(7), lctl-nodemap-activate(8), lctl-nodemap-add-idmap(8), lctl-nodemap-add-range(8), lctl-nodemap-del(8), lctl-nodemap-del-idmap(8), lctl-nodemap-del-offset(8), lctl-nodemap-del-range(8), lctl-nodemap-modify(8), lctl-nodemap-new(8)