OS Manuals

lctl(8)

lctl - Lustre filesystem administrator configuration tool

LCTL(8) Lustre Configuration Utilities LCTL(8)

lctl - Lustre filesystem administrator configuration tool

lctl
lctl [--device DEVICE] COMMAND [ARGS]

lctl is used by a storage administrator to perform various Lustre operations, allowing configuration, maintenance, and debugging features to be accessed. It can be invoked non-interactivly to execute the specified COMMAND, or it can be run interactively without arguments to execute multiple commands. In some cases, COMMAND must be executed on a specific DEVICE, which can be specified on the command-line, or interactively before the command is run.

The most common commands are: debug_daemon, debug_kernel, device_list, get_param, set_param, list_nids, mark, and ping. Most sub-commands are explained in separate man pages of the form lctl-COMMAND as listed in the SEE ALSO section at the end. Some sub-commands do not have their own detailed man page are listed below.

The following options can be used to invoke lctl.

Specify the DEVICE name or number to be used for the operation. The device_list command shows a list of locally configured devices.
To get basic help on the meaning and syntax of a command.
Output a list of the commands supported by the lctl utility.
Ignore errors during script processing.
Output the build version of the Lustre kernel modules.
Output the build version of the utility itself.
Quit an interactive session.

The lctl command supports bash-completion(1) for tab completion of sub-command names and their options, with proper package installation and supporing shell usage. This can greatly simplify finding available commands, their options, and in many cases option arguments.

To list commands, type 'lctl TAB', or after partially completing a command name. To list long options (more descriptive and easily understood) type 'COMMAND --TAB', and to list short options type 'COMMAND -TAB'. Some commands also allow context-specific completion of arguments to the command-line option, for example generating a list of OBD devices for the --device option, or a list of OST pools for the pool_* commands.

The on-line tool set for displaying, modifying, backup, or removal of Lustre system configuration. For detail, please see: lctl-get_param(8), lctl-set_param(8), lctl-llog_print(8), and lctl-lcfg_*(8).

Start or stop LNET, or select a network type for other lctl LNET commands. See also lnetctl(8) for most LNet configuration commands.
Print all the connected remote NIDs for a given network type.
Print the network interface information for a given NETWORK type.
Print all Network Identifiers on the local node. LNET must be running.
Print the known peers for a given NETWORK type.
Check LNET connectivity via an LNET ping. This will use the fabric appropriate to the specified NID. By default lctl will attempt to reach the remote node up to 120 seconds and then timeout. To disable the timeout just specify an negative timeout value.
Replace the LNet NIDs. See lctl-replace_nids(8) for details.
Print the complete routing table.
From a list of nids for a remote node, show which interface communication will take place on.

This will select the specified OBD device. All other commands depend on the device being set.
Show all the local Lustre OBDs. See lctl-device_list(8).

Set a permanent configuration parameter for any device via the MGS. This command must be run on the MGS node.
[NOTE] The conf_param command is deprecated and should not be used for configuring Lustre parameters. It only applies settings to targets present at the time the command is executed; targets (such as OSTs) added or mounted later will not automatically receive these settings. For reliable and consistent configuration, use set_param instead. The set_param command immediately applies parameter changes to all relevant targets, including those added in the future. See lctl-set_param(8) for details. For example, replace:
mgs# lctl conf_param testfs-OST0000.osc.max_rpcs_in_flight=16
    
with:
mgs# lctl set_param -P osc.testfs-*.max_rpcs_in_flight=16
    
Update any scripts or procedures to use set_param in place of conf_param. Use conf_param -d to remove existing conf_param settings; set_param -P does not remove them.

The -d option deletes a parameter setting (use the default value at the next restart). A null value for VALUE also deletes the parameter setting. This is useful if an incorrect or obsolete parameter is in the configuration.

All of the writable parameters under lctl list_param (e.g. lctl list_param -w osc.*.* or lctl list_param -F osc.*.* | grep = ) can be permanently set using lctl conf_param , but the format is slightly different. For conf_param, the device is specified first, then the obdtype. (See examples below.) Wildcards are not supported.
Additionally, failover nodes may be added (or removed), and some system-wide parameters may be set as well (sys.at_max, sys.at_min, sys.at_extra, sys.at_early_margin, sys.at_history, sys.timeout, sys.ldlm_timeout.) DEVICE is ignored for system wide parameters.
Reactivate an import after deactivating, below. This setting is only effective until the next restart (see conf_param).
Deactivate an import, in particular meaning do not assign new file stripes to an OSC. This command should be used on the OSC in the MDT LOV corresponding to a failed OST device, to prevent further attempts at communication with the failed OST.
Abort the recovery process on a restarting MDT or OST device

Changelog user can be registered and deregistered on particular device. Changelog starts logging when any user is registered.

For more details see:

lctl-changelog_register(8)
Register a new changelog user on specified MDT device with specified parameters.
lctl-changelog_deregister(8)
Deregister an existing changelog user on the specified MDT.

The nodemap feature allows UIDs, GIDs, and PROJIDs from remote systems to be mapped to local sets of UIDs, GIDs, and PROJIDs while retaining POSIX ownership, permissions and quota information. As a result, multiple sites with conflicting user and group identifiers can operate on a single Lustre file system without creating collisions in the UID, GID, or PROJID space.

Nodemap commands must be run on the MGS from where the current nodemap configuration is asynchronously propagated to all server nodes. The nodemap configuration further persists across restarts. An exception represents dynamic nodemaps (see lctl-nodemap-add (8)) which are defined on the local server only and are not persistent.

In addition to assigning client nodes to nodemaps, it is necessary to define a privileged nodemap that covers all Lustre server nodes for ID mapping to work correctly. The privileged nodemap should have both "admin" and "trusted" properties set.

The "default" nodemap is a special nodemap which cannot be removed and represents a fallback nodemap for all nodes that are not assigned to any other nodemap. Because of its special role, only some properties can be set on it, such as "squash_uid". ID mapping is explicitly disabled on the "default" nodemap. Care should be taken when modifying the "admin" and "trusted" properties on the "default" nodemap, especially if Lustre servers are not covered by any other nodemap.

See also:

lctl-nodemap-activate(8)
Activate/deactivate the nodemap feature.
lctl-nodemap-add(8)
Add a new nodemap, to which NID ranges, identities, and properties can be added.
lctl-nodemap-add-idmap(8)
Add a UID or GID mapping to a nodemap.
lctl-nodemap-add-range(8)
Define a range of NIDs for a nodemap.
lctl-nodemap-add-offset(8)
Set a UID/GID/PROJID offset value
lctl-nodemap-del(8)
Delete an existing nodemap.
lctl-nodemap-del-idmap(8)
Delete an existing UID or GID mapping from a nodemap.
lctl-nodemap-del-range(8)
Delete an existing NID range from a nodemap.
lctl-nodemap-del-offset(8)
Remove a UID/GID/PROJID offset from a nodemap.
lctl-nodemap-fileset-add(8)
Add a primary or alternate fileset to a nodemap.
lctl-nodemap-fileset-del(8)
Delete a type of fileset from a nodemap.
lctl-nodemap-fileset-modify(8)
Modify a fileset in a nodemap, changing its path, type, or access mode.
lctl-nodemap-modify(8)
Modify a nodemap property.
lctl-nodemap-info(8)
Print nodemap information.
lctl-nodemap-set-cap(8)
Set user capabilities on a nodemap.
lctl-nodemap-set-sepol(8)
Set SELinux policy info on a nodemap.

This command runs on MGS node having MGS device mounted with -o nosvc. It cleans up configuration files stored in the CONFIGS/ directory of any records marked SKIP. If the device name is given, then the specific logs for that filesystem (e.g. testfs-MDT0000) is processed. Otherwise, if a filesystem name is given then all configuration files for the specified filesystem are cleared.

An on-line Lustre consistency check and repair tool. It is used for totally replacing the old lfsck tool for kinds of Lustre inconsistency verification, including: corrupted or lost OI mapping, corrupted or lost link EA, corrupted or lost FID in name entry, dangling name entry, multiple referenced name entry, unmatched MDT-object and name entry pairs, orphan MDT-object, incorrect MDT-object links count, corrupted namespace, corrupted or lost LOV EA, lost OST-object, multiple referenced OST-object, unmatched MDT-object and OST-object pairs, orphan OST-object, and so on.

See also:

lctl-lfsck-start(8)
Start LFSCK on the specified MDT or OST device with specified parameters.

The tools set for write (modify) barrier on all MDTs. For detail, please see:

lctl-barrier(8)

Lustre Quota ID Aggregate (LQA) management commands for managing quota ID ranges in a Lustre filesystem. LQAs are quota pools containing red-black trees that store quota ID ranges and verify whether an incoming ID belongs to the current LQA.

See lctl-lqa(8) for command syntax and examples. Aggregate limits for an LQA are configured via lfs-setquota(1) with the --lqa option.

ZFS backend based snapshot tools set. The tool loads system configuration from the file /etc/ldev.conf on the MGS, and call related ZFS commands to maintain Lustre snapshot pieces on all targets (MGS/MDT/OST). The configuration file /etc/ldev.conf is not only for snapshot, but also for other purpose.

The format is:

HOST foreign/-LABEL DEVICE.RI[JOURNAL_PATH].B /- 
[RAIDTAB]

The format of LABEL is:

FSNAME-.RI{ROLE}{INDEX} or {ROLE}{INDEX}

The format of DEVICE is:

[md|zfs:]
[POOL_DIR
/]
POOL/FILESYSTEM

Snapshot only uses the fields HOST, LABEL and DEVICE.

# cat /etc/ldev.conf

host-mdt1 - myfs-MDT0000 zfs:/tmp/myfs-mdt1/mdt1
host-mdt2 - myfs-MDT0001 zfs:myfs-mdt2/mdt2
host-ost1 - OST0000 zfs:/tmp/myfs-ost1/ost1
host-ost2 - OST0001 zfs:myfs-ost2/ost2
See also:
lctl-snapshot-create(8)
Create snapshot with the given name.
lctl-snapshot-destroy(8)
Destroy the specified snapshot.
lctl-snapshot-modify(8)
Modify the specified snapshot.
lctl-snapshot-list(8)
Query the snapshot information.
lctl-snapshot-mount(8)
Mount the specified snapshot.
lctl-snapshot-umount(8)
Umount the specified snapshot.

Start and stop the debug daemon, and control the output filename and size.
Dump the kernel debug buffer to stdout or file.
Convert kernel-dumped debug log from binary to plain text format.
Clear the kernel debug buffer.
Insert marker text in the kernel debug buffer.
Filter kernel debug messages by subsystem or mask.
Show specific type of messages.
List all the subsystem and debug types.
Provide gdb-friendly module information.

List the devices configured on the local node:

# lctl dl

0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
1 UP ost OSS OSS_uuid 3
2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3

Dump the kernel debug log to a file for review:

# lctl dk /tmp/debug.log
Debug log: 87 lines, 87 kept, 0 dropped.

lctl is part of the lustre(7) filesystem package since release 0.5.0

lfs(1), lustre(7), lctl(8), lctl-barrier(8), lctl-changelog_deregister(8), lctl-changelog_register(8), lctl-get_param(8), lctl-lcfg(8), lctl-lfsck-query(8), lctl-lfsck-start(8), lctl-lfsck-stop(8), lctl-list_param(8), lctl-llog_catlist(8), lctl-llog_info(8), lctl-llog_print(8), lctl-lqa(8), lctl-lqa-add(8), lctl-lqa-destroy(8), lctl-lqa-list(8), lctl-lqa-new(8), lctl-lqa-remove(8), lctl-network(8), lctl-nodemap-activate(8), lctl-nodemap-add(8), lctl-nodemap-add-idmap(8), lctl-nodemap-add-offset(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-set-capabilities(8), lctl-pcc(8), lctl-replace-nids(8), lctl-set_param(8), lctl-snapshot-create(8), lctl-snapshot-destroy(8), lctl-snapshot-list(8), lctl-snapshot-modify(8), lctl-snapshot-mount(8), lctl-snapshot-umount(8), mkfs.lustre(8), mount.lustre(8)

2026-03-06 Lustre

lustre 2.17.59-r2 · enterprise-packages · ingested 2026-10-11