1 .TH lctl 8 "2017 Jan 12" Lustre "configuration utilities"
3 lctl \- Low level Lustre filesystem configuration utility
8 .B lctl --device <devno> <command [args]>
12 .B lctl --list-commands
16 is used to directly control Lustre via an ioctl interface, allowing
17 various configuration, maintenance, and debugging features to be accessed.
20 can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are
32 To get a complete listing of available commands, type
34 at the lctl prompt. To get basic help on the meaning and syntax of a
38 . Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys.
40 For non-interactive use, one uses the second invocation, which runs command after connecting to the device.
42 .SS System Configuration
43 The on-line tool set for backup or removal of Lustre system configuration. For detail, please see:
48 .SS Network Configuration
50 .BR network " <" up / down >|< tcp / o2ib >
51 Start or stop LNET, or select a network type for other
56 Print all Network Identifiers on the local node. LNET must be running.
58 .BI which_nid " <nidlist>"
59 From a list of nids for a remote node, show which interface communication
62 .BI replace_nids " <devicename> <nid1>[,nid2,nid3 ...]"
63 Replace the LNET Network Identifiers for a given device,
64 as when the server's IP address has changed.
65 This command must be run on the MGS node.
66 Only MGS server should be started (command execution returns error
67 in another cases). To start the MGS service only:
68 mount -t lustre <MDT partition> -o nosvc <mount point>
69 Note the replace_nids command skips any invalidated records in the configuration log.
70 The previous log is backed up with the suffix '.bak'.
72 .BI ping " <nid> timeout"
73 Check LNET connectivity via an LNET ping. This will use the fabric
74 appropriate to the specified NID. By default lctl will attempt to
75 reach the remote node up to 120 seconds and then timeout. To disable
76 the timeout just specify an negative timeout value.
79 Print the network interface information for a given
84 Print the known peers for a given
89 Print all the connected remote NIDs for a given
94 Print the complete routing table.
98 .BI device " <devname> "
99 This will select the specified OBD device. All other commands depend on the device being set.
102 Show all the local Lustre OBDs. AKA
105 .SS Device Operations
107 .BI list_param " [-F|-R] <param_search ...>"
108 List the Lustre or LNet parameter name
110 Add '/', '@' or '=' for dirs, symlinks and writeable files, respectively.
113 Recursively list all parameters under the specified parameter search string. If
115 is unspecified, all the parameters will be shown.
120 # lctl list_param ost.*
127 # lctl list_param -F ost.* debug
136 # lctl list_param -R mdt
142 mdt.lustre-MDT0000.capa
144 mdt.lustre-MDT0000.capa_count
146 mdt.lustre-MDT0000.capa_key_timeout
148 mdt.lustre-MDT0000.capa_timeout
150 mdt.lustre-MDT0000.commit_on_sharing
152 mdt.lustre-MDT0000.evict_client
156 .BI get_param " [-F|-n|-N|-R] <parameter ...>"
157 Get the value of Lustre or LNET parameter.
160 When -N specified, add '/', '@' or '=' for directories, symlinks and writeable files, respectively.
164 Print only the value and not parameter name.
167 Print only matched parameter names and not the values. (Especially useful when using patterns.)
170 Print all of the parameter names below the specified name.
175 # lctl get_param ost.*
182 # lctl get_param -n debug timeout
184 super warning dlmtrace error emerg ha rpctrace vfstrace config console
189 # lctl get_param -N ost.* debug
197 lctl "get_param -NF" is equivalent to "list_param -F".
199 .BI set_param " [-n] [-P] [-d] <parameter=value ...>"
200 Set the value of Lustre or LNET parameter.
203 Disable printing of the key name when printing values.
206 Set the parameter permanently, filesystem-wide.
207 This parameters are only visible to 2.5.0 and later clients, older clients will not see these parameters.
210 Remove the permanent setting (only with -P option)
215 # lctl set_param fail_loc=0 timeout=20
222 # lctl set_param -n fail_loc=0 timeout=20
229 # lctl set_param -P osc.*.max_dirty_mb=32
232 .BI conf_param " [-d] <device|fsname>.<parameter>=<value>"
233 Set a permanent configuration parameter for any device via the MGS. This
234 command must be run on the MGS node.
236 .B -d <device|fsname>.<parameter>
237 Delete a parameter setting (use the default value at the next restart).
238 A null value for <value> also deletes the parameter setting. This is
239 useful if an incorrect or obsolete parameter is in the configuration.
243 All of the writable parameters under
246 .I lctl list_param -F osc.*.* | grep =
247 ) can be permanently set using
249 , but the format is slightly different. For conf_param, the device is specified first, then the obdtype. (See examples below.) Wildcards are not supported.
251 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.
255 # lctl conf_param testfs.sys.at_max=1200
257 # lctl conf_param testfs.llite.max_read_ahead_mb=16
259 # lctl conf_param testfs-MDT0000.lov.stripesize=2M
261 # lctl conf_param lustre-OST0001.osc.active=0
263 # lctl conf_param testfs-OST0000.osc.max_dirty_mb=29.15
265 # lctl conf_param testfs-OST0000.ost.client_cache_seconds=15
267 # lctl conf_param testfs-OST0000.failover.node=1.2.3.4@tcp1
269 # lctl conf_param -d testfs-OST0000.bad_param
272 Reactivate an import after deactivating, below. This setting is only effective until the next restart (see
277 Deactivate an import, in particular meaning do not assign new file stripes
278 to an OSC. This command should be used on the OSC in the MDT LOV
279 corresponding to a failed OST device, to prevent further attempts at
280 communication with the failed OST.
283 Abort the recovery process on a restarting MDT or OST device
287 .BI changelog_register " [-n]"
288 Register a new changelog user for a particular device. Changelog entries
289 will not be purged beyond any registered users' set point. (See lfs changelog_clear.)
292 Print only the ID of the newly registered user.
294 .BI changelog_deregister " <id>"
295 Unregister an existing changelog user. If the user's "clear" record number
296 is the minimum for the device, changelog records will be purged until the
300 An identity mapping feature that facilitates mapping of client UIDs and GIDs to
301 local file system UIDs and GIDs, while maintaining POSIX ownership, permissions,
304 While the nodemap feature is enabled, all client file system access is subject
305 to the nodemap identity mapping policy, which consists of the 'default' catchall
306 nodemap, and any user-defined nodemaps. The 'default' nodemap maps all client
307 identities to 99:99 (nobody:nobody). Administrators can define nodemaps for a
308 range of client NIDs which map identities, and these nodemaps can be flagged as
309 'trusted' so identities are accepted without translation, as well as flagged
310 as 'admin' meaning that root is not squashed for these nodes.
312 Note: In the current phase of implementation, to use the nodemap functionality
313 you only need to enable and define nodemaps on the MDS. The MDSes must also be
314 in a nodemap with the admin and trusted flags set. To use quotas with nodemaps,
315 you must also use set_param to enable and define nodemaps on the OSS (matching
316 what is defined on the MDS). Nodemaps do not currently persist, unless you
317 define them with set_param and use the -P flag. Note that there is a hard limit
318 to the number of changes you can persist over the lifetime of the file system.
323 \fBlctl-nodemap-activate\fR(8)
325 Activate/deactivate the nodemap feature.
328 \fBlctl-nodemap-add\fR(8)
330 Add a new nodemap, to which NID ranges, identities, and properties can be added.
333 \fBlctl-nodemap-del\fR(8)
335 Delete an existing nodemap.
338 \fBlctl-nodemap-add-range\fR(8)
340 Define a range of NIDs for a nodemap.
343 \fBlctl-nodemap-del-range\fR(8)
345 Delete an existing NID range from a nodemap.
348 \fBlctl-nodemap-add-idmap\fR(8)
350 Add a UID or GID mapping to a nodemap.
353 \fBlctl-nodemap-del-idmap\fR(8)
355 Delete an existing UID or GID mapping from a nodemap.
358 \fBlctl-nodemap-modify\fR(8)
360 Modify a nodemap property.
362 .SS Configuration logs
364 .BI clear_conf " <device|fsname>"
365 This command runs on MGS node having MGS device mounted with -o
366 nosvc. It cleans up configuration files stored in the CONFIGS/ directory
367 of any records marked SKIP. If the device name is given, then the
368 specific logs for that filesystem (e.g. testfs-MDT0000) is processed.
369 Otherwise, if a filesystem name is given then all configuration files for the
370 specified filesystem are cleared.
373 An on-line Lustre consistency check and repair tool. It is used for totally
374 replacing the old lfsck tool for kinds of Lustre inconsistency verification,
375 including: corrupted or lost OI mapping, corrupted or lost link EA, corrupted
376 or lost FID in name entry, dangling name entry, multiple referenced name entry,
377 unmatched MDT-object and name entry pairs, orphan MDT-object, incorrect
378 MDT-object links count, corrupted namespace, corrupted or lost lov EA, lost
379 OST-object, multiple referenced OST-object, unmatched MDT-object and OST-object
380 pairs, orphan OST-object, and so on.
385 \fBlctl-lfsck-start\fR(8)
387 Start LFSCK on the specified MDT or OST device with specified parameters.
390 \fBlctl-lfsck-stop\fR(8)
392 Stop LFSCK on the specified MDT or OST device.
395 \fBlctl-lfsck-query\fR(8)
397 Get the LFSCK global status via the specified MDT device.
401 The tools set for write (modify) barrier on all MDTs. For detail, please see:
403 \fBlctl-barrier\fR(8)
407 ZFS backend based snapshot tools set. The tool loads system configuration
410 on the MGS, and call related ZFS commands to
411 maintain Lustre snapshot pieces on all targets (MGS/MDT/OST).
412 The configuration file
414 is not only for snapshot, but also
415 for other purpose. The format is:
416 <host> foreign/- <label> <device> [journal-path]/- [raidtab]
421 fsname-<role><index> or <role><index>
426 [md|zfs:][pool_dir/]<pool>/<filesystem>
428 Snapshot only uses the fields <host>, <label> and <device>.
436 host-mdt1 - myfs-MDT0000 zfs:/tmp/myfs-mdt1/mdt1
437 host-mdt2 - myfs-MDT0001 zfs:myfs-mdt2/mdt2
438 host-ost1 - OST0000 zfs:/tmp/myfs-ost1/ost1
439 host-ost2 - OST0001 zfs:myfs-ost2/ost2
444 \fBlctl-snapshot-create\fR(8)
446 Create snapshot with the given name.
449 \fBlctl-snapshot-destroy\fR(8)
451 Destroy the specified snapshot.
454 \fBlctl-snapshot-modify\fR(8)
456 Modify the specified snapshot.
459 \fBlctl-snapshot-list\fR(8)
461 Query the snapshot information.
464 \fBlctl-snapshot-mount\fR(8)
466 Mount the specified snapshot.
469 \fBlctl-snapshot-umount\fR(8)
471 Umount the specified snapshot.
477 Start and stop the debug daemon, and control the output filename and size.
479 .BI debug_kernel " [file] [raw]"
480 Dump the kernel debug buffer to stdout or file.
482 .BI debug_file " <input> [output]"
483 Convert kernel-dumped debug log from binary to plain text format.
486 Clear the kernel debug buffer.
489 Insert marker text in the kernel debug buffer.
491 .BI filter " <subsystem id/debug mask>"
492 Filter kernel debug messages by subsystem or mask.
494 .BI show " <subsystem id/debug mask>"
495 Show specific type of messages.
497 .BI debug_list " <subs/types>"
498 List all the subsystem and debug types.
500 .BI modules " <path>"
501 Provide gdb-friendly module information.
504 The following options can be used to invoke lctl.
507 The device to be used for the operation. This can be specified by name or
511 .B --ignore_errors | ignore_errors
512 Ignore errors during script processing
514 .B lustre_build_version
515 Output the build version of the Lustre kernel modules
518 Output the build version of the lctl utility
521 Output a list of the commands supported by the lctl utility
524 Provides brief help on the various arguments
527 Quit the interactive lctl session
533 0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
534 1 UP ost OSS OSS_uuid 3
535 2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
538 Debug log: 87 lines, 87 kept, 0 dropped.
550 .BR mount.lustre (8),
552 .BR lctl-lfsck-start (8),
553 .BR lctl-lfsck-stop (8),
554 .BR lctl-lfsck-query (8),
556 .BR lctl-barrier (8),
557 .BR lctl-snapshot-create (8),
558 .BR lctl-snapshot-destroy (8),
559 .BR lctl-snapshot-modify (8),
560 .BR lctl-snapshot-list (8),
561 .BR lctl-snapshot-mount (8),
562 .BR lctl-snapshot-umount (8),
563 .BR lctl-llog_catlist (8),
564 .BR lctl-llog_info (8),
565 .BR lctl-llog_print (8),
566 .BR lctl-network (8),
567 .BR lctl-nodemap-activate (8),
568 .BR lctl-nodemap-add-idmap (8),
569 .BR lctl-nodemap-add-range (8),
570 .BR lctl-nodemap-add (8),
571 .BR lctl-nodemap-del-idmap (8),
572 .BR lctl-nodemap-del-range (8),
573 .BR lctl-nodemap-del (8),
574 .BR lctl-nodemap-modify (8),