LCTL(8)
π LCTL(8) β Lustre Configuration Utilities π
okay bestie, welcome to lctl, aka the Lustre filesystem administrator configuration tool π
this is the manual page for it, and it's a big one, so buckle up π¦
β¨ NAME β¨
lctl β our beloved Lustre filesystem administrator configuration tool π
β¨ SYNOPSIS β¨
lctl
lctl [--device DEVICE] COMMAND [ARGS]
β¨ DESCRIPTION β¨
So basically, lctl is the tool a storage administrator uses to do all the things in Lustre β configuration, maintenance, and debugging features are all reachable through it π
You can run it two ways:
- non-interactively, where it just executes the
COMMANDyou gave it and dips - interactively, by running it with no arguments, so you can fire off a whole bunch of commands in one session π¬
And here's the tea: sometimes a COMMAND has to be run on a specific DEVICE. You can either name that device on the command line, or pick it interactively before you run the command π
The most common commands are: debug_daemon, debug_kernel, device_list, get_param, set_param, list_nids, mark, and ping β
Most sub-commands live in their own separate man pages, named like lctl-COMMAND, and you can find the list of them in the SEE ALSO section at the very end π Some sub-commands don't have their own detailed man page though β those are the ones listed further down in this page. No cap.
β¨ OPTIONS β¨
These are the options you can use to invoke lctl, bestie:
--deviceβ name theDEVICE(by name or by number) that the operation should be done on. Wanna know what devices you've got locally? Thedevice_listcommand literally shows you the list π«Άhelp COMMANDβ get the basic help on what a command means and how to actually type it out π--list-commandsβ print out every command that thelctlutility supports ποΈ--ignore_errors,ignore_errorsβ ignore errors while a script is being processed. Messy but sometimes you gotta πlustre_build_versionβ print the build version of the Lustre kernel modules π-V,--versionβ print the build version of the utility itself (yes, that's a different version, don't @ me) πexit,quitβ dip out of an interactive session βοΈ
β¨ BASH COMPLETION β¨
lctl supports bash-completion(1) for tab completion of sub-command names and their options β assuming you've got the package installed properly and you're using a supporting shell πβ¨ This lowkey makes life SO much easier for finding what commands exist, what options they take, and in lots of cases even the arguments those options want.
Here's the cheat sheet:
- Type
lctl TABto list commands β or do it after you've partially typed out a command name π« - Type
COMMAND --TABto list the long options (the descriptive, easily-understood ones, we love her) πΈ - Type
COMMAND -TABto list the short options β‘
And some commands even do context-specific completion of the arguments for a command-line option β like generating a list of OBD devices for the --device option, or a list of OST pools for the pool_* commands. Iconic behaviour, honestly π
β¨ COMMANDS β¨
π System Configuration
This is the on-line tool set for displaying, modifying, backing up, or removing Lustre system configuration πΎ For the details, please see: lctl-get_param(8), lctl-set_param(8), lctl-llog_print(8), and lctl-lcfg_*(8) π
π Network Configuration
network{up|down}|{tcp|o2ib}β start or stop LNET, or pick a network type for the otherlctlLNET commands π Also seelnetctl(8)for most LNet configuration commands β she's the main character for that job tbh.conn_listβ print every connected remote NID for a given network type πinterface_listβ print the network interface info for a givenNETWORKtype π§list_nidsβ print all the Network Identifiers on the local node. Heads up: LNET must be running for this one β οΈpeer_listβ print the known peers for a givenNETWORKtype π―ping NID TIMEOUTβ check LNET connectivity via an LNET ping π This uses the fabric appropriate to the NID you specified. By defaultlctlwill try to reach the remote node for up to 120 seconds and then time out. Wanna disable the timeout? Just give it a negative timeout value, bestie π
careful: that's "negative", not "zero". Verbally committing to a negative number is the move here.
replace_nids DEVICE_NAME NIDS_LISTβ replace the LNet NIDs. Seelctl-replace_nids(8)for the details πroute_listβ print the complete routing table πΊοΈwhich_nid NIDLISTβ given a list of NIDs for a remote node, show which interface communication will actually take place on π΅οΈ
π Device Selection
device DEVNAMEβ this selects the specified OBD device. Every other command depends on the device having been set π―device_listβ show all the local Lustre OBDs. Seelctl-device_list(8)π
π Device Operations
conf_param [-d] DEVICE|FSNAME.PARAMETER=VALUE
Set a permanent configuration parameter for any device via the MGS. This command must be run on the MGS node π
BIG NOTE, BESTIE: theconf_paramcommand is deprecated and should NOT be used for configuring Lustre parameters. Here's why: it only applies settings to targets that are present at the moment the command runs. Targets added or mounted later (like OSTs) will not automatically get those settings π© For reliable and consistent configuration, useset_paraminstead. Theset_paramcommand immediately applies parameter changes to all relevant targets, including ones added in the future. Seelctl-set_param(8)for the details β¨
For example, replace:
lctl conf_param testfs-OST0000.osc.max_rpcs_in_flight=16
with:
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 π§ And FYI: use conf_param -d to remove existing conf_param settings β set_param -P does not remove them, periodt π
The -d option deletes a parameter setting (so it uses the default value the next time it restarts). A null VALUE also deletes the parameter setting. Super useful when an incorrect or obsolete parameter is sitting in the configuration π§Ή
Parameters:
All 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 π« With conf_param, the device comes first, then the obdtype. (See the examples below.) Wildcards are not supported. β
On top of that, 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. And DEVICE gets completely ignored for system-wide parameters π
activateβ reactivate an import after deactivating it (see below). Heads up: this setting is only effective until the next restart (seeconf_param) πdeactivateβ deactivate an import, which specifically means do not assign new file stripes to an OSC. You'd use this command on the OSC in the MDT LOV corresponding to a failed OST device, so it stops trying to talk to the failed OST πabort_recoveryβ abort the recovery process on a restarting MDT or OST device π₯
π Changelogs
A changelog user can be registered and deregistered on a particular device. The changelog starts logging as soon as any user is registered π
For more details see:
lctl-changelog_register(8)β register a new changelog user on the specified MDT device with the specified parameters πlctl-changelog_deregister(8)β deregister an existing changelog user on the specified MDT π
π Nodemap
The nodemap feature lets UIDs, GIDs, and PROJIDs from remote systems 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 all operate on a single Lustre file system without creating collisions in the UID, GID, or PROJID space. It's giving diplomacy π
Nodemap commands must be run on the MGS, which is where the current nodemap configuration is asynchronously propagated from to all server nodes π‘ The nodemap configuration also persists across restarts. The exception to that? Dynamic nodemaps (see lctl-nodemap-add(8)) which are defined on the local server only and are not persistent β οΈ
Besides assigning client nodes to nodemaps, you also need to define a privileged nodemap that covers all Lustre server nodes for ID mapping to work correctly. That privileged nodemap should have both "admin" and "trusted" properties set π
The "default" nodemap is a special one β it cannot be removed, and it's the fallback nodemap for all nodes not assigned to any other nodemap π Because of that special role, only some properties can be set on it, like "squash_uid". ID mapping is explicitly disabled on the "default" nodemap. So be careful when modifying the "admin" and "trusted" properties on the "default" nodemap β especially if Lustre servers aren't 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 π‘οΈ
π Configuration logs
clear_conf DEVICE|FSNAMEβ this command runs on an MGS node that has the MGS device mounted with-o nosvcπ§Ό It cleans up configuration files stored in theCONFIGS/directory of any records markedSKIP. If the device name is given, then the specific logs for that filesystem (e.g.testfs-MDT0000) get processed. Otherwise, if a filesystem name is given, then all configuration files for the specified filesystem are cleared π§½
LFSCK π
okay bestie, this one is the big one β an on-line Lustre consistency check and repair tool. It's here to totally replace the old lfsck tool, and it handles basically every kind of Lustre inconsistency verification you can think of, 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.lctl-lfsck-stop(8)β stop LFSCK on the specified MDT or OST device.lctl-lfsck-query(8)β get the LFSCK global status via the specified MDT device.
Barrier π
The tools set for write (modify) barrier on all MDTs. For the deets, please see:
Snapshot πΈ
ZFS backend based snapshot tools set π¦ The tool loads system configuration from the file /etc/ldev.conf on the MGS, and calls related ZFS commands to maintain Lustre snapshot pieces on all targets (MGS/MDT/OST). Heads up: /etc/ldev.conf is not just for snapshot, it also does other stuff π
The format is:
HOST foreign/-LABEL DEVICE[JOURNAL_PATH]/- [RAIDTAB]
The format of LABEL is:
FSNAME-{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.
Debug π
debug_daemonβ start and stop the debug daemon, and control the output filename and size.debug_kernel [FILE] [RAW]β dump the kernel debug buffer to stdout or file.debug_file INPUT [OUTPUT]β convert kernel-dumped debug log from binary to plain text format.clearβ clear the kernel debug buffer.mark TEXTβ insert marker text in the kernel debug buffer.filter SUBSYSTEM_ID|DEBUG_MASKβ filter kernel debug messages by subsystem or mask.show SUBSYSTEM_ID|DEBUG_MASKβ show specific type of messages.debug_list SUBS|TYPESβ list all the subsystem and debug types.modules PATHβ provide gdb-friendly module information.
π EXAMPLES π
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.
β¨ AVAILABILITY β¨
lctl is part of the lustre(7) filesystem package since release 0.5.0 π«Ά
π SEE ALSO π
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-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)
and that's the whole page bestie, we did it π this one's from the Lustre collection, version dated 2026-03-06, living under LCTL(8) β iconic, no notes πβ¨
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms