LCTL-SET_PARAM(8)

NAME
lctl-set_param - Lustre filesystem set parameter utility

SYNOPSIS
lctl set_param [--client|-C [FSNAME]] [--delete|-d] [--file|-F] [--no-name|-n] [--module|-o] [--permanent|-P] [--threads|-t [THREAD_COUNT]] PARAMETER=VALUE ...
lctl set_param -F FILENAME

DESCRIPTION
Set the value of the named Lustre or LNet PARAMETER to VALUE on the local node. Parameter names consist of one or more components, separated by a '.' (period). Each component may be specified by plain text or by a wildcard in the glob(7) format. When wildcards are used, more than one parameter may match and be changed. Parameters are often, but not always, of the form OBD_NAME.OBD_INSTANCE.PARAMETER_NAME, where OBD_NAME is one of the OBD object types, like ldlm, llite, lmv, lov, mdc, osc, etc., and OBD_INSTANCE is the name of a Lustre device, like testfs-OST0000, but may be a specific component, or contain wildcards to match some or all devices on the node. Parameters can only be modified by the root user for security reasons.

OPTIONS
The various options supported by lctl list_param are listed and explained below:

-C, --client
    Write parameters to the local /etc/lustre/mount.client.params config file. Upon all future Lustre client mounts those parameters will be set on the local node. If FSNAME was specified, the parameters will be instead written to the mount-specific /etc/lustre/mount.FSNAME.params config file. The filesystem specific params will be set only when that filesystem is mounted and will override the more generic client mount parameters.

-d, --delete
    Remove the permanent setting (only for parameters set with the -P option).

-F, --file
    Set parameters from FILENAME instead of from the command-line. The contents of FILENAME is YAML format, created by the output from running 'lctl llog_print FSNAME -client', or from any other valid llog configuration log as listed by 'lctl llog_catlist'.

-n, --no-name
    Disable printing of the parameter name after setting it.

-o, --module
    Allow module parameters to be visible to the lctl set_param command. The module parameters will be set on the local node at module load time.

-P, --permanent
    Set PARAMETER permanently on all nodes connected to the MGS on which the command is run. To limit wildcard PARAMETER matching to specific filesystems or parameters, ensure that PARAMETER contains a suitably-specific expression for the OBD_NAME and OBD_INSTANCE, such as the filesystem and/or target name. This option is only available in Lustre 2.5.0 and later clients, older clients cannot set persistent parameters, nor will they see them.

-t, --threads [THREAD_COUNT]
    Spawn threads to set multiple parameters in parallel, optionally specifying the maximum number of threads to run (with no space between -t and THREAD_COUNT). Without this option parameter(s) are set serially. If lctl was compiled without pthread support, a warning message will be printed and parameters will be set serially. If -t is specified without any argument, it runs up to 8 threads by default.

EXAMPLES
Set two parameters temporarily on the local node:
        client# lctl set_param jobid_name=%H:%e:%u debug_mb=1024
        jobid_name=%H:%e:%u
        debug_mb=1024

Set two parameters, but don't print parameter names with the values:
        client# lctl set_param -n jobid_name=%H:%e:%u debug_mb=1024
        %H:%e:%u
        1024

Run two parallel threads to set parameters that may do a lot of work:
        client# lctl set_param -t2 ldlm.namespaces.*osc*.lru_size=clear
        ldlm.namespaces.fsname-OST0001-osc-MDT0000.lru_size=clear
        ldlm.namespaces.fsname-OST0000-osc-MDT0000.lru_size=clear

Permanently set a parameter with a wildcard in the MGS config llog:
        mgs# lctl set_param -P osc.testfs-OST*.max_dirty_mb=512
        osc.testfs-OST0000-osc-ffff8803c9c0f000.max_dirty_mb=512
        osc.testfs-OST0001-osc-ffff8803c9c0f000.max_dirty_mb=512
        osc.testfs-OST0002-osc-ffff8803c9c0f000.max_dirty_mb=512
        osc.testfs-OST0003-osc-ffff8803c9c0f000.max_dirty_mb=512
        osc.testfs-OST0004-osc-ffff8803c9c0f000.max_dirty_mb=512

Permanently set osc.testfs-*.max_dirty_mb=2000 when mounting 'testfs' and osc.testfs-*.max_dirty_mb=1024 for other Lustre mountpoints on this client node:
        client# lctl set_param -C=test_fs osc.testfs-*.max_dirty_mb=2000
        client# lctl set_param -C osc.*.max_dirty_mb=1024

Backup the 'params' configuration log, and then restore it (at some later time):
        mgs# lctl llog_print params > /tmp/params.yaml
        [ params log is erased, not shown here ]
        mgs# lctl set_param -F /tmp/params.yaml

AVAILABILITY
lctl set_param is part of the lustre(7) filesystem package since release 1.7.0

SEE ALSO
lustre(7), lctl(8), lctl-find_param(8), lctl-get_param(8), lctl-list_param(8), lctl-llog_catlist(8), lctl-llog_print(8)